#version 330 core

uniform sampler2D tex;
uniform vec2      TexelSize;
uniform vec4      color;

in vec2 uv;

layout (location = 0) out vec4 frag_color;

void main()
{
	vec4 final;
	final  = texture(tex, uv - 3.0*TexelSize)*0.06;
	final += texture(tex, uv - 2.0*TexelSize)*0.125;
	final += texture(tex, uv - 1.0*TexelSize)*0.1875;
	final += texture(tex, uv                )*0.25;
	final += texture(tex, uv + 1.0*TexelSize)*0.1875;
	final += texture(tex, uv + 2.0*TexelSize)*0.125;
	final += texture(tex, uv + 3.0*TexelSize)*0.06;
	frag_color = (final - color)*color.a;
}
