/* 

 gigatron for C2 
 V1.0 initial release 
 */
  
#ifdef GL_ES
precision mediump float;
#endif

uniform mediump sampler2D samplerFront;
varying mediump vec2 vTex;
uniform mediump float seconds;
uniform mediump float date;
uniform mediump float pixelWidth;
uniform mediump float pixelHeight;
vec2 iResolution = vec2( 1./pixelWidth, 1./pixelHeight);

uniform float intensity,sx,sy;

void main()
{
    vec2 p = gl_FragCoord.xy ;
	vec2 uv =p.xy/iResolution.xy;
	uv=vTex;
	float s = smoothstep(-5., 1.0, uv.x*uv.y );
	p = step(sx,mod(p.xy, sy));
	vec3 tc=texture2D(samplerFront,uv).rgb;
	gl_FragColor =vec4(tc,1.);
	gl_FragColor *= p.x*p.y*vec4(0.5*s, .5*s, 0.5*s, 1.)*intensity;
}
	
 
