1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 20:28:49 -05:00

Fixed inverted gamma.

This commit is contained in:
Camilla Berglund 2011-04-01 12:46:03 +02:00
parent 22479e29b7
commit 1412732874

View File

@ -57,7 +57,7 @@ GLFWAPI void glfwSetGammaFormula(float gamma, float blacklevel, float gain)
float value = (float) i / ((float) (size - 1));
// Apply gamma
value = pow(value, gamma) * 65535.f + 0.5f;
value = pow(value, 1.f / gamma) * 65535.f + 0.5f;
// Apply gain
value = gain * (value - 32767.5f) + 32767.5f;