#version 120
varying vec2 uv;

uniform float spread;
uniform float strength;
uniform float width;
uniform sampler2D textureSampler;

void main() {
	float samples = 8.0;
	vec4 texColor = texture2D(textureSampler, uv - vec2(0.5/width * spread, 0)) / samples;// * 0.1945945946;
	texColor = texColor + texture2D(textureSampler, uv - vec2(2.5/width * spread, 0)) / samples;// * 0.0540540541;
	texColor = texColor + texture2D(textureSampler, uv - vec2(4.5/width * spread, 0)) / samples;// * 0.0540540541;
	texColor = texColor + texture2D(textureSampler, uv - vec2(6.5/width * spread, 0)) / samples;// * 0.0540540541;
	texColor = texColor + texture2D(textureSampler, uv + vec2(0.5/width * spread, 0)) / samples;// * 0.0540540541;
	texColor = texColor + texture2D(textureSampler, uv + vec2(2.5/width * spread, 0)) / samples;// * 0.1945945946;
	texColor = texColor + texture2D(textureSampler, uv + vec2(4.5/width * spread, 0)) / samples;// * 0.1945945946;
	texColor = texColor + texture2D(textureSampler, uv + vec2(6.5/width * spread, 0)) / samples;// * 0.1945945946;
	texColor = texColor * strength;
	gl_FragColor = texColor;
}