1//************************************ bs::framework - Copyright 2018 Marko Pintera **************************************//
2//*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********//
3#include "Renderer/BsRenderSettings.h"
4#include "Private/RTTI/BsRenderSettingsRTTI.h"
5#include "CoreThread/BsCoreObjectSync.h"
6
7namespace bs
8{
9 template <class Processor>
10 void AutoExposureSettings::rttiEnumFields(Processor p)
11 {
12 p(histogramLog2Min);
13 p(histogramLog2Max);
14 p(histogramPctLow);
15 p(histogramPctHigh);
16 p(minEyeAdaptation);
17 p(maxEyeAdaptation);
18 p(eyeAdaptationSpeedUp);
19 p(eyeAdaptationSpeedDown);
20 }
21
22 RTTITypeBase* AutoExposureSettings::getRTTIStatic()
23 {
24 return AutoExposureSettingsRTTI::instance();
25 }
26
27 RTTITypeBase* AutoExposureSettings::getRTTI() const
28 {
29 return getRTTIStatic();
30 }
31
32 template <class Processor>
33 void TonemappingSettings::rttiEnumFields(Processor p)
34 {
35 p(filmicCurveShoulderStrength);
36 p(filmicCurveLinearStrength);
37 p(filmicCurveLinearAngle);
38 p(filmicCurveToeStrength);
39 p(filmicCurveToeNumerator);
40 p(filmicCurveToeDenominator);
41 p(filmicCurveLinearWhitePoint);
42 }
43
44 RTTITypeBase* TonemappingSettings::getRTTIStatic()
45 {
46 return TonemappingSettingsRTTI::instance();
47 }
48
49 RTTITypeBase* TonemappingSettings::getRTTI() const
50 {
51 return getRTTIStatic();
52 }
53
54 template <class Processor>
55 void WhiteBalanceSettings::rttiEnumFields(Processor p)
56 {
57 p(temperature);
58 p(tint);
59 }
60
61 RTTITypeBase* WhiteBalanceSettings::getRTTIStatic()
62 {
63 return WhiteBalanceSettingsRTTI::instance();
64 }
65
66 RTTITypeBase* WhiteBalanceSettings::getRTTI() const
67 {
68 return getRTTIStatic();
69 }
70
71 template <class Processor>
72 void ColorGradingSettings::rttiEnumFields(Processor p)
73 {
74 p(saturation);
75 p(gain);
76 p(contrast);
77 p(offset);
78 }
79
80 RTTITypeBase* ColorGradingSettings::getRTTIStatic()
81 {
82 return ColorGradingSettingsRTTI::instance();
83 }
84
85 RTTITypeBase* ColorGradingSettings::getRTTI() const
86 {
87 return getRTTIStatic();
88 }
89
90 template <class Processor>
91 void AmbientOcclusionSettings::rttiEnumFields(Processor p)
92 {
93 p(enabled);
94 p(radius);
95 p(bias);
96 p(fadeDistance);
97 p(fadeRange);
98 p(intensity);
99 p(power);
100 p(quality);
101 }
102
103 RTTITypeBase* AmbientOcclusionSettings::getRTTIStatic()
104 {
105 return AmbientOcclusionSettingsRTTI::instance();
106 }
107
108 RTTITypeBase* AmbientOcclusionSettings::getRTTI() const
109 {
110 return getRTTIStatic();
111 }
112
113 template <class Processor>
114 void DepthOfFieldSettings::rttiEnumFields(Processor p)
115 {
116 p(enabled);
117 p(focalDistance);
118 p(focalRange);
119 p(nearTransitionRange);
120 p(farTransitionRange);
121 p(nearBlurAmount);
122 p(farBlurAmount);
123 }
124
125 RTTITypeBase* DepthOfFieldSettings::getRTTIStatic()
126 {
127 return DepthOfFieldSettingsRTTI::instance();
128 }
129
130 RTTITypeBase* DepthOfFieldSettings::getRTTI() const
131 {
132 return getRTTIStatic();
133 }
134
135 template <class Processor>
136 void ScreenSpaceReflectionsSettings::rttiEnumFields(Processor p)
137 {
138 p(enabled);
139 p(quality);
140 p(intensity);
141 p(maxRoughness);
142 }
143
144 RTTITypeBase* ScreenSpaceReflectionsSettings::getRTTIStatic()
145 {
146 return ScreenSpaceReflectionsSettingsRTTI::instance();
147 }
148
149 RTTITypeBase* ScreenSpaceReflectionsSettings::getRTTI() const
150 {
151 return getRTTIStatic();
152 }
153
154 template <class Processor>
155 void BloomSettings::rttiEnumFields(Processor p)
156 {
157 p(enabled);
158 p(quality);
159 p(threshold);
160 p(intensity);
161 p(tint);
162 }
163
164 RTTITypeBase* BloomSettings::getRTTIStatic()
165 {
166 return BloomSettingsRTTI::instance();
167 }
168
169 RTTITypeBase* BloomSettings::getRTTI() const
170 {
171 return getRTTIStatic();
172 }
173
174 template <class Processor>
175 void ShadowSettings::rttiEnumFields(Processor p)
176 {
177 p(directionalShadowDistance);
178 p(numCascades);
179 p(cascadeDistributionExponent);
180 p(shadowFilteringQuality);
181 }
182
183 RTTITypeBase* ShadowSettings::getRTTIStatic()
184 {
185 return ShadowSettingsRTTI::instance();
186 }
187
188 RTTITypeBase* ShadowSettings::getRTTI() const
189 {
190 return getRTTIStatic();
191 }
192
193 template <class Processor>
194 void RenderSettings::rttiEnumFields(Processor p)
195 {
196 p(enableAutoExposure);
197 p(autoExposure);
198 p(enableTonemapping);
199 p(tonemapping);
200 p(whiteBalance);
201 p(colorGrading);
202 p(depthOfField);
203 p(ambientOcclusion);
204 p(screenSpaceReflections);
205 p(bloom);
206 p(exposureScale);
207 p(gamma);
208 p(enableFXAA);
209 p(enableHDR);
210 p(enableLighting);
211 p(enableShadows);
212 p(enableIndirectLighting);
213 p(overlayOnly);
214 p(enableSkybox);
215 p(cullDistance);
216 }
217
218 template void RenderSettings::rttiEnumFields(RttiCoreSyncSize);
219 template void RenderSettings::rttiEnumFields(RttiCoreSyncWriter);
220 template void RenderSettings::rttiEnumFields(RttiCoreSyncReader);
221
222 RTTITypeBase* RenderSettings::getRTTIStatic()
223 {
224 return RenderSettingsRTTI::instance();
225 }
226
227 RTTITypeBase* RenderSettings::getRTTI() const
228 {
229 return getRTTIStatic();
230 }
231}
232