uniform sampler2D bluringTex;
varying vec2 texCoord;

const float blurSize = 0.5/720.0;

float weights[5] = float[](
	0.12,
	0.15,
	0.16,
	0.15,
	0.12
);

void main() {
	vec4 sum = vec4(0.0);
 
	float totalWeight = 0;
	for (int i=0; i<5; i++)
	{
		sum += texture2D(bluringTex, vec2(texCoord.x - (i-2.0)*blurSize, texCoord.y)) * weights[i];
		totalWeight += weights[i];
	}
	sum /= totalWeight;
 
	gl_FragColor = sum;
} 