uniform float agk_time;
uniform vec2 agk_resolution;

uniform sampler2D texture0;
uniform sampler2D texture1;
varying vec2 uvVarying;

#ifdef GL_ES
	#ifdef GL_FRAGMENT_PRECISION_HIGH
		precision highp float;
	#else
		precision mediump float;
	#endif
#endif

void main()
{
	
    vec4 color = texture2D( texture1, uvVarying);
    
    if (color.a < 0.001)
    {
		color = texture2D( texture0, uvVarying);
	}
	else
	{
		if (color.a < 1.0)
		{	
			color += texture2D( texture0, uvVarying);
		}
    }
    gl_FragColor = color;
}
