From 78e1e8732b084ab74ef104575fa2604957e19274 Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Wed, 14 Dec 2011 07:34:47 +0100 Subject: [PATCH] Fixed (?) a fragment shader in the "Shader" example --- examples/shader/resources/edge.frag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/shader/resources/edge.frag b/examples/shader/resources/edge.frag index 173a1e71c..14551f98f 100644 --- a/examples/shader/resources/edge.frag +++ b/examples/shader/resources/edge.frag @@ -24,7 +24,7 @@ void main() vec3 result = sqrt(hEdge.rgb * hEdge.rgb + vEdge.rgb * vEdge.rgb); float edge = length(result); vec4 pixel = gl_Color * texture2D(texture, gl_TexCoord[0].xy); - if (edge > edge_threshold * 8) + if (edge > (edge_threshold * 8.0)) pixel.rgb = vec3(0.0, 0.0, 0.0); else pixel.a = edge_threshold;