#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
varying highp vec2 textureCoordinate;

uniform sampler2D inputImageTexture;

uniform float time; // 由time控制

void main()
{
    vec4 color = texture2D(inputImageTexture,textureCoordinate);

    vec4 color1 = vec4(0.0);
    float value = mod(fract(time),0.5)*2.0;
    value = mix(value,0.0,step(0.5,value));

    vec2 newCoordinate = (textureCoordinate - vec2(0.5))*(1.0-value*0.66667)+vec2(0.5);
    color1 = texture2D(inputImageTexture,newCoordinate);
    color1 = mix(color,color1,0.3333*(1.0 - value));

    gl_FragColor = color1;
}
