@@ -97,6 +97,8 @@ void AddECLinearShader(GpuShaderCreatorRcPtr & shaderCreator,
9797 const std::string & contrastName,
9898 const std::string & gammaName)
9999{
100+ // clang-format off
101+
100102 const double pivot = std::max (EC::MIN_PIVOT, ec->getPivot ());
101103
102104 st.newLine () << st.floatDecl (" exposure" ) << " = pow( 2., " << exposureName << " );" ;
@@ -122,6 +124,8 @@ void AddECLinearShader(GpuShaderCreatorRcPtr & shaderCreator,
122124 st.dedent ();
123125 }
124126 st.newLine () << " }" ;
127+
128+ // clang-format on
125129}
126130
127131void AddECLinearRevShader (GpuShaderCreatorRcPtr & shaderCreator,
@@ -131,6 +135,8 @@ void AddECLinearRevShader(GpuShaderCreatorRcPtr & shaderCreator,
131135 const std::string & contrastName,
132136 const std::string & gammaName)
133137{
138+ // clang-format off
139+
134140 const double pivot = std::max (EC::MIN_PIVOT, ec->getPivot ());
135141
136142 st.newLine () << st.floatDecl (" exposure" ) << " = pow( 2., " << exposureName << " );" ;
@@ -157,6 +163,8 @@ void AddECLinearRevShader(GpuShaderCreatorRcPtr & shaderCreator,
157163
158164 st.newLine () << shaderCreator->getPixelName () << " .rgb = "
159165 << shaderCreator->getPixelName () << " .rgb / exposure;" ;
166+
167+ // clang-format on
160168}
161169
162170void AddECVideoShader (GpuShaderCreatorRcPtr & shaderCreator,
@@ -166,6 +174,8 @@ void AddECVideoShader(GpuShaderCreatorRcPtr & shaderCreator,
166174 const std::string & contrastName,
167175 const std::string & gammaName)
168176{
177+ // clang-format off
178+
169179 double pivot = std::pow (std::max (EC::MIN_PIVOT, ec->getPivot ()), EC::VIDEO_OETF_POWER);
170180
171181 st.newLine () << st.floatDecl (" exposure" ) << " = pow( pow( 2., " << exposureName << " ), "
@@ -191,6 +201,8 @@ void AddECVideoShader(GpuShaderCreatorRcPtr & shaderCreator,
191201 st.dedent ();
192202 }
193203 st.newLine () << " }" ;
204+
205+ // clang-format on
194206}
195207
196208void AddECVideoRevShader (GpuShaderCreatorRcPtr & shaderCreator,
@@ -200,6 +212,8 @@ void AddECVideoRevShader(GpuShaderCreatorRcPtr & shaderCreator,
200212 const std::string & contrastName,
201213 const std::string & gammaName)
202214{
215+ // clang-format off
216+
203217 double pivot = std::pow (std::max (EC::MIN_PIVOT, ec->getPivot ()), EC::VIDEO_OETF_POWER);
204218
205219 st.newLine () << st.floatDecl (" exposure" ) << " = pow( pow( 2., " << exposureName << " ), "
@@ -227,6 +241,8 @@ void AddECVideoRevShader(GpuShaderCreatorRcPtr & shaderCreator,
227241
228242 st.newLine () << shaderCreator->getPixelName () << " .rgb = "
229243 << shaderCreator->getPixelName () << " .rgb / exposure;" ;
244+
245+ // clang-format on
230246}
231247
232248void AddECLogarithmicShader (GpuShaderCreatorRcPtr & shaderCreator,
@@ -236,6 +252,8 @@ void AddECLogarithmicShader(GpuShaderCreatorRcPtr & shaderCreator,
236252 const std::string & contrastName,
237253 const std::string & gammaName)
238254{
255+ // clang-format off
256+
239257 double pivot = std::max (EC::MIN_PIVOT, ec->getPivot ());
240258 float logPivot = (float )std::max (0 ., std::log2 (pivot / 0.18 ) *
241259 ec->getLogExposureStep () +
@@ -250,6 +268,8 @@ void AddECLogarithmicShader(GpuShaderCreatorRcPtr & shaderCreator,
250268
251269 st.newLine () << shaderCreator->getPixelName () << " .rgb = "
252270 << shaderCreator->getPixelName () << " .rgb * contrast + offset;" ;
271+
272+ // clang-format on
253273}
254274
255275void AddECLogarithmicRevShader (GpuShaderCreatorRcPtr & shaderCreator,
@@ -259,6 +279,8 @@ void AddECLogarithmicRevShader(GpuShaderCreatorRcPtr & shaderCreator,
259279 const std::string & contrastName,
260280 const std::string & gammaName)
261281{
282+ // clang-format off
283+
262284 double pivot = std::max (EC::MIN_PIVOT, ec->getPivot ());
263285 float logPivot = (float )std::max (0 ., std::log2 (pivot / 0.18 ) *
264286 ec->getLogExposureStep () +
@@ -273,6 +295,8 @@ void AddECLogarithmicRevShader(GpuShaderCreatorRcPtr & shaderCreator,
273295
274296 st.newLine () << shaderCreator->getPixelName () << " .rgb = "
275297 << shaderCreator->getPixelName () << " .rgb / contrast + offset;" ;
298+
299+ // clang-format on
276300}
277301
278302
@@ -288,6 +312,8 @@ void GetExposureContrastGPUShaderProgram(GpuShaderCreatorRcPtr & shaderCreator,
288312 GpuShaderText st (shaderCreator->getLanguage ());
289313 st.indent ();
290314
315+ // clang-format off
316+
291317 st.newLine () << " " ;
292318 st.newLine () << " // Add ExposureContrast '"
293319 << ExposureContrastOpData::ConvertStyleToString (ec->getStyle ())
@@ -296,6 +322,8 @@ void GetExposureContrastGPUShaderProgram(GpuShaderCreatorRcPtr & shaderCreator,
296322 st.newLine () << " {" ;
297323 st.indent ();
298324
325+ // clang-format on
326+
299327 AddProperties (shaderCreator, st, ec,
300328 exposureName,
301329 contrastName,
0 commit comments