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

uniform sampler2D inputImageTexture;

uniform highp float iTime;

uniform highp vec2 iResolution;

void main() {
    highp vec2 uv = textureCoordinate;

    highp vec4 color = texture(iChannel0, uv);

    float strength = 50.0;

    float x = (uv.x + 4.0 ) * (uv.y + 4.0 ) * (iTime * 10.0);
    highp vec4 grain = vec4(mod((mod(x, 13.0) + 1.0) * (mod(x, 123.0) + 1.0), 0.01)-0.005) * strength;

    //if(abs(uv.x - 0.5) < 0.002)
    //color = vec4(0.0);

    //     grain = 1.0 - grain;
    //     fragColor = color * grain;

    fragColor = color + grain;
}