From 52c646b2cc993557b22bf8cfa86400b898aa0e65 Mon Sep 17 00:00:00 2001 From: Frederic Bouvier Date: Tue, 21 Sep 2010 09:21:44 +0200 Subject: [PATCH] Better use of clamp --- Shaders/reflect-bump-spec.frag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shaders/reflect-bump-spec.frag b/Shaders/reflect-bump-spec.frag index 075e48497..206428e09 100644 --- a/Shaders/reflect-bump-spec.frag +++ b/Shaders/reflect-bump-spec.frag @@ -97,7 +97,7 @@ void main (void) reflFactor = (gl_FrontMaterial.shininess / 128) + transparency_offset; } - reflFactor = clamp(reflFactor, 0.0, 1.0) * ns.a; + reflFactor = clamp(reflFactor * ns.a, 0.0, 1.0); // set ambient adjustment to remove bluiness with user input float ambient_offset = clamp(ambient_correction, -1.0, 1.0);