Corrected tosRGBFloat() computation.

This commit is contained in:
NissimHadar 2018-04-23 11:53:35 -07:00
parent 9e1bd69af3
commit ea6585a0b9

View file

@ -102,7 +102,7 @@ inline float ColorUtils::tosRGBFloat(const float &linear) {
} else if (0 < linear && linear < SRGB_ELBOW_INV) {
sRGBValue = 12.92f * linear;
} else if (SRGB_ELBOW_INV <= linear && linear < 1) {
sRGBValue = 1.055f * powf(linear, 0.41666f - 0.055f);
sRGBValue = 1.055f * powf(linear, 0.41666f) - 0.055f;
} else {
sRGBValue = 1.0f;
}