
uniform sampler2D t1;
uniform sampler2D t2;
uniform float angle;
uniform float amount;
uniform float mix;
void main()
{
		vec2 uv = gl_TexCoord[0].xy;
	if(amount>0.0f)
	{

		vec4 c=vec4(0);
		float a = amount/200.0;
		float ang = angle / 3.141592654/2;
		float i=0;
		float u=0;
		for(i=-5;i<5;i++)
		{
			c=c+texture2D(t1,uv+vec2(sin(angle)*i*a,cos(angle)*i*a) );
		}
		c=c/vec4(i*2);
		gl_FragColor = c*vec4(mix) +texture2D(t2,uv)*vec4(1-mix);
	}
	else
		gl_FragColor = texture2D(t1,uv);
}
