diff --git a/examples/shader/resources/blur.sfx b/examples/shader/resources/blur.sfx index c856e332..bde2fa65 100644 --- a/examples/shader/resources/blur.sfx +++ b/examples/shader/resources/blur.sfx @@ -6,15 +6,15 @@ void main() vec2 offx = vec2(offset, 0.0); vec2 offy = vec2(0.0, offset); - vec4 pixel = texture2D(texture, gl_TexCoord[0].xy) * 1 + - texture2D(texture, gl_TexCoord[0].xy - offx) * 2 + - texture2D(texture, gl_TexCoord[0].xy + offx) * 2 + - texture2D(texture, gl_TexCoord[0].xy - offy) * 2 + - texture2D(texture, gl_TexCoord[0].xy + offy) * 2 + - texture2D(texture, gl_TexCoord[0].xy - offx - offy) * 1 + - texture2D(texture, gl_TexCoord[0].xy - offx + offy) * 1 + - texture2D(texture, gl_TexCoord[0].xy + offx - offy) * 1 + - texture2D(texture, gl_TexCoord[0].xy + offx + offy) * 1; + vec4 pixel = texture2D(texture, gl_TexCoord[0].xy) * 1.0 + + texture2D(texture, gl_TexCoord[0].xy - offx) * 2.0 + + texture2D(texture, gl_TexCoord[0].xy + offx) * 2.0 + + texture2D(texture, gl_TexCoord[0].xy - offy) * 2.0 + + texture2D(texture, gl_TexCoord[0].xy + offy) * 2.0 + + texture2D(texture, gl_TexCoord[0].xy - offx - offy) * 1.0 + + texture2D(texture, gl_TexCoord[0].xy - offx + offy) * 1.0 + + texture2D(texture, gl_TexCoord[0].xy + offx - offy) * 1.0 + + texture2D(texture, gl_TexCoord[0].xy + offx + offy) * 1.0; gl_FragColor = gl_Color * (pixel / 13.0); } diff --git a/examples/shader/resources/pixelate.sfx b/examples/shader/resources/pixelate.sfx index 5b82f08d..12a334e7 100644 --- a/examples/shader/resources/pixelate.sfx +++ b/examples/shader/resources/pixelate.sfx @@ -3,7 +3,7 @@ uniform vec2 mouse; void main() { - float factor = 5 + 100 * length(mouse); + float factor = 5.0 + 100.0 * length(mouse); vec2 pos = floor(gl_TexCoord[0].xy * factor + 0.5) / factor; gl_FragColor = texture2D(texture, pos) * gl_Color;