#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D   u_tex0;
uniform float		u_fAngle;
uniform vec2		u_vCentre;
varying vec2        v_texture;
varying vec4	    v_col;
void main()
	{
	float fRadius = 0.05;
	
	vec2 vTex = v_texture;
	float fD = distance(u_vCentre, v_texture);
	
	vTex -= u_vCentre;
	float fPerc = (fRadius - fD) / fRadius;
	float fTheta = fPerc * fPerc * u_fAngle * 8.0;
	float fS = sin(fTheta);
	float fC = cos(fTheta);
	vTex = vec2(dot(vTex, vec2(fC, -fS)), dot(vTex, vec2(fS, fC)));
	vTex += u_vCentre;

	gl_FragColor = texture2D(u_tex0, vTex) * v_col;
	}
