#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() {
    float uParams[4];
    uParams[0] = 0.14;
    uParams[1] = 0.72;
    uParams[2] = 0.32;
    uParams[3] = 0.18;

    float ctrlTime = iTime * uParams[2];
    float time = uParams[0]*10.+mod(ctrlTime, max(0.1, (uParams[1]-uParams[0])*10.));


     highp vec2 uv = textureCoordinate;

     float amount = 0.0;

     amount = (1.0 + sin(time*6.0)) * 0.5;
     amount *= 1.0 + sin(time*16.0) * 0.5;
     amount *= 1.0 + sin(time*19.0) * 0.5;
     amount *= 1.0 + sin(time*27.0) * 0.5;
     amount = pow(amount, 3.0);

     amount *= 0.05 * uParams[3];

     highp vec4 col;
     col.r = texture( iChannel0, vec2(uv.x+amount,uv.y) ).r;
     col.g = texture( iChannel0, uv ).g;
     col.b = texture( iChannel0, vec2(uv.x-amount,uv.y) ).b;
     col.a = texture( iChannel0, uv ).a;

     col *= (1.0 - amount * 0.5);

     fragColor = col;
 }