uniform float pixel_size;
varying vec2 v_texCoord;
uniform sampler2D u_texture;
uniform float GAME_SCALE;

void main()
{
	vec4 sum = vec4(0.0);

	vec4 current_pixel = texture2D(u_texture, v_texCoord);

	if(current_pixel.a > 0)
	{
		sum = current_pixel;
	}
	else
	{
		sum += texture2D(u_texture, vec2(v_texCoord.x - 4.0*pixel_size, v_texCoord.y)) * 0.08;
		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 - 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 + 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.08;
	}



	gl_FragColor = sum;

}