Ensure proper precedence when calculating SRGB to linear conversion

This commit is contained in:
baldurk
2017-01-02 18:32:40 +00:00
parent 8c8cf07385
commit 1a2ff55fa4
+1 -1
View File
@@ -62,7 +62,7 @@ float ConvertSRGBToLinear(float srgb)
if (srgb <= 0.04045f)
return srgb / 12.92f;
else
return pow(saturate(srgb) + 0.055f / 1.055f, 2.4f);
return pow((saturate(srgb) + 0.055f) / 1.055f, 2.4f);
}
// main texture display shader, used for the texture viewer. It samples the right resource