mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Fixed (?) a fragment shader in the "Shader" example
This commit is contained in:
parent
c33fa1d290
commit
78e1e8732b
@ -24,7 +24,7 @@ void main()
|
|||||||
vec3 result = sqrt(hEdge.rgb * hEdge.rgb + vEdge.rgb * vEdge.rgb);
|
vec3 result = sqrt(hEdge.rgb * hEdge.rgb + vEdge.rgb * vEdge.rgb);
|
||||||
float edge = length(result);
|
float edge = length(result);
|
||||||
vec4 pixel = gl_Color * texture2D(texture, gl_TexCoord[0].xy);
|
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);
|
pixel.rgb = vec3(0.0, 0.0, 0.0);
|
||||||
else
|
else
|
||||||
pixel.a = edge_threshold;
|
pixel.a = edge_threshold;
|
||||||
|
Loading…
Reference in New Issue
Block a user