mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-30 05:58:52 -05:00
Fixed inverted gamma.
This commit is contained in:
parent
22479e29b7
commit
1412732874
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user