#version 430

layout (location=2) uniform int size=5;
uniform sampler2D input_tex;
in vec2 texcoord;
layout(location = 0) out vec4 out0;

void main(void) {

	vec4 m = vec4(0.0);
	vec2 p = texcoord;
	vec2 n;
	for(int i = -size; i < size+1; i++) {
		n.x = float(i * i) * sign(float(i))/1280./2.;
		n.y = 0.0;
		m += texture(input_tex, p + n);
	}

   out0 = m/(size*2+1);
}