uniform vec2 resolution;

uniform sampler2D u_texture;
uniform sampler2D blur_texture;
varying vec2 v_texCoord;
varying vec4 v_fragmentColor;						

void main()
{
	float pixel_size = 1.0/resolution.x;
	
	vec4 color = texture2D(u_texture, v_texCoord);
	if(color.a > 0)
	{
		vec4 sum = vec4(0.0);
		sum += texture2D(u_texture, vec2(v_texCoord.x - 4.0*pixel_size, v_texCoord.y)) * 0.06;
		sum += texture2D(u_texture, vec2(v_texCoord.x - 3.0*pixel_size, v_texCoord.y)) * 0.09;
		sum += texture2D(u_texture, vec2(v_texCoord.x - 2.0*pixel_size, v_texCoord.y)) * 0.12;
		sum += texture2D(u_texture, vec2(v_texCoord.x - 1.0*pixel_size, v_texCoord.y)) * 0.15;
		sum += texture2D(u_texture, vec2(v_texCoord.x, v_texCoord.y)) * 0.16;
		sum += texture2D(u_texture, vec2(v_texCoord.x + 1.0*pixel_size, v_texCoord.y)) * 0.15;
		sum += texture2D(u_texture, vec2(v_texCoord.x + 2.0*pixel_size, v_texCoord.y)) * 0.12;
		sum += texture2D(u_texture, vec2(v_texCoord.x + 3.0*pixel_size, v_texCoord.y)) * 0.09;
		sum += texture2D(u_texture, vec2(v_texCoord.x + 4.0*pixel_size, v_texCoord.y)) * 0.06;

		//sum.a = 1.0;
		gl_FragColor = sum;//vec4(sum.rgb, texture2D(u_texture, v_texCoord).a);
		
	}else{
		gl_FragColor = vec4(0);
	}
		

}