uniform sampler2D buf0;
uniform float time;
uniform vec2 resolution;
varying vec2 v_texCoord;							
varying vec4 v_fragmentColor;

#define M_PI (3.14159265359)

void main()
{

	vec2 gRes = resolution;
	vec2 gPos = v_texCoord;
	//vec2 cRes = iChannelResolution [0].xy;	
	vec2 cPos = (gPos - vec2 (0.5, 0.5))*2.0;
	
	float r = distance (cPos, vec2 (0.0));
	float a = atan (cPos.x, cPos.y) / (M_PI * 2.0);

	float r1 = mod (r*0.125 + (time * 1.0)/8.0, 1.0) ;
	float a1 = mod (a, 1.0) ;
	
	vec4 _1 = texture2D(buf0, vec2 (r1, a1));
	gl_FragColor =  _1*(1.0 - r)*0.6 + (1.0 - r)*0.7;

}
