mirror of
https://github.com/glfw/glfw.git
synced 2024-11-29 21:37:27 +00: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));
|
float value = (float) i / ((float) (size - 1));
|
||||||
|
|
||||||
// Apply gamma
|
// Apply gamma
|
||||||
value = pow(value, gamma) * 65535.f + 0.5f;
|
value = pow(value, 1.f / gamma) * 65535.f + 0.5f;
|
||||||
|
|
||||||
// Apply gain
|
// Apply gain
|
||||||
value = gain * (value - 32767.5f) + 32767.5f;
|
value = gain * (value - 32767.5f) + 32767.5f;
|
||||||
|
Loading…
Reference in New Issue
Block a user