#define iChannel0 inputImageTexture
#define texture(a,b) texture2D(a,fract(b))
#define fragColor gl_FragColor
precision highp float;
 varying highp vec2 textureCoordinate;

 uniform sampler2D inputImageTexture;

 uniform highp float iTime;

 void main() {
     highp vec2 uv = textureCoordinate;

     highp float time = mod(iTime,0.6);

     highp vec4 base = texture(iChannel0,uv);
     uv.x += (0.5-uv.x)*fract(time);
     uv.y += (0.5-uv.y)*fract(time);
     //uv.y += (1.0-uv.y)*fract(time);
     highp vec4 overlay = texture(iChannel0,uv);

     fragColor = mix(base,overlay,0.5 * (0.6-fract(time)));
 }

