uniform sampler2D uTex0;
uniform sampler2D uTexNoise;
uniform float uTime;
uniform vec2 uFocusPos;
void main()
{
	float timeFade = smoothstep(.0, .6, uTime);
	vec2 v = gl_TexCoord[0].st - uFocusPos;
	float len = length( v );
	vec2 uv = gl_TexCoord[0].st;
	vec4 origColor  = texture2D(uTex0, uv);
	vec4 color = origColor;
	vec3 grayscale = vec3(dot(color.rgb, vec3(0.3, 0.59, 0.11 )));
	float fade = smoothstep( len, 0.0, 0.12 );
	color.rgb = color.rgb * vec3(1.0-fade) + grayscale.rgb * vec3(fade);
	color.rgb *= max(1.0 - fade*0.8, 0.04);
	float ns = texture2D(uTexNoise, gl_TexCoord[0].st).r;
	gl_FragColor =  mix(origColor, color, timeFade*0.95 + timeFade*ns*0.05);
}
