uniform sampler2D texture;
uniform float time = 1.0;
void main()
{
	float t = time;
    
	vec2 uv = gl_TexCoord[0].xy;
    
    uv.x += step(uv.x, 0.5) * (0.5-uv.x) * 2.0;
    uv.y += step(uv.y, 0.5) * (0.5-uv.y) * 2.0;
    
    uv.x -= cos(t/20.0) * 0.5; //step(sin(t),0.2);
    uv.y -= sin(t/5.0) * 1.5; //step(sin(t),0.2);
    
	gl_FragColor = texture2D(texture, uv);   
}