## blurx.vert

void main()
	{
	gl_Position = ftransform();
	gl_TexCoord[0] = gl_MultiTexCoord0;
	}

## blurx.frag

uniform sampler2D tex;
uniform float blur;
uniform float pixel;

void main()
	{
	float fb = floor( blur );
	float div = fb * fb;
	vec2 coord = gl_TexCoord[0].st - vec2( fb * pixel, 0 );
	vec4 color;
	float coef = 1.0;
	
	for ( int i = 0; i < fb; i++ )
		{
		vec2 c = coord;
		c.x = clamp( c, 0.0, 1.0 );
		color += texture2D( tex, c ) * coef;
		coord.x += pixel;
		coef += 1.0;
		}
	color += texture2D( tex, coord ) * coef;
	for ( int i = 0; i < fb; i++ )
		{
		coord.x += pixel;
		coef -= 1.0;
		vec2 c = coord;
		c.x = clamp( c, 0.0, 1.0 );
		color += texture2D( tex, c ) * coef;
		}
	
	color /= div;
	
	gl_FragColor = color;
	}