From c0e8caebe6ad6a9602558aba0b3437b7e614ef5b Mon Sep 17 00:00:00 2001 From: siavash Date: Fri, 5 Jul 2013 04:34:19 +0430 Subject: [PATCH] Rolled back a few changes. --- src/gamma.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gamma.c b/src/gamma.c index d09d25e7..21e13a70 100644 --- a/src/gamma.c +++ b/src/gamma.c @@ -81,11 +81,10 @@ GLFWAPI void glfwSetGamma(GLFWmonitor* handle, float gamma) for (i = 0; i < 256; i++) { - float inv255, value; + float value; // Calculate intensity - inv255 = 1.f / 255.f; - value = i * inv255; + value = i / 255.f; // Apply gamma curve value = (float) pow(value, 1.f / gamma) * 65535.f + 0.5f;