uniform sampler2D tex1;
varying vec2 texC;
uniform vec4 col;

uniform float disto;
uniform float t;

void main()
{
	vec2 texCM = texC;
	float lengthFromCent = 1.0-length(texCM-vec2(0.5));
	lengthFromCent = pow(lengthFromCent,2.0);
	float realDisto = disto + 0.1;
	texCM.x += sin(realDisto*68.1f*texC.y  +t*2.1f + lengthFromCent*0.01f)*(realDisto*0.1f+(lengthFromCent * 0.05f));
	texCM.y += cos(realDisto*18.13f  +t*2.1f + lengthFromCent*0.01f)*(realDisto*0.1f+(lengthFromCent * 0.05f));
	gl_FragColor = texture2D(tex1,vec2(texCM.x,1.0f-texCM.y))*col;
}