mkxp/shader/blur.frag
Jonas Kulla a54acce6b7 Implement Bitmap 'blur'
I was a bit confused at first because I thought Enterbrain
had actually implemented a full Gaussian blur, but nope,
just dumb averaging.
2013-10-01 18:12:52 +02:00

16 lines
292 B
GLSL

uniform sampler2D texture;
varying vec2 v_texCoord;
varying vec2 v_blurCoord[2];
void main()
{
vec4 frag = vec4(0, 0, 0, 0);
frag += texture2D(texture, v_texCoord);
frag += texture2D(texture, v_blurCoord[0]);
frag += texture2D(texture, v_blurCoord[1]);
gl_FragColor = frag / 3.0;
}