19 #ifndef _STELTONEREPRODUCER_HPP_
20 #define _STELTONEREPRODUCER_HPP_
87 {oneOverMaxdL = 1.f/maxdL; lnOneOverMaxdL=std::log(oneOverMaxdL); term2TimesOneOverMaxdLpOneOverGamma = std::pow(term2*oneOverMaxdL, oneOverGamma);}
96 {oneOverGamma = 1.f/gamma; term2TimesOneOverMaxdLpOneOverGamma = std::pow(term2*oneOverMaxdL, oneOverGamma);}
103 return std::pow((
float)(inputScale*worldLuminance*M_PI*0.0001f),alphaWaOverAlphaDa) * term2;
111 return std::pow((
float)(displayLuminance/term2),1.f/alphaWaOverAlphaDa)/(inputScale*M_PI*0.0001f);
136 const float lnPix0p0001 = -8.0656104861f;
138 const float temp = ((lnInputScale + lnWorldLuminance + lnPix0p0001) *
139 alphaWaOverAlphaDa+lnTerm2 + lnOneOverMaxdL) * pFact;
153 return std::exp(temp);
161 void getShadersParams(
float& a,
float& b,
float & c)
const
163 a=alphaWaOverAlphaDa;
165 c=term2TimesOneOverMaxdLpOneOverGamma;
175 float lnOneOverMaxdL;
183 float alphaWaOverAlphaDa;
187 float term2TimesOneOverMaxdLpOneOverGamma;
190 #endif // _STELTONEREPRODUCER_HPP_