uniform sampler2D 	tex,
					blurred;
varying vec2 		texcoord;
uniform float		focus;

void main()
{
	//float focus=clamp(2105.0-fov*32.0,0.0,90.0);
	//float radius=(focus*0.5);//abs(1.0/focus);
		  
	vec4 c0=texture2D(tex, texcoord);
	vec4 c1=texture2D(blurred, texcoord);//*0.5;
	
	float d=c1.w;//*1000.0;//-texture2D(pos, texcoord).z;
	
	/*if(d==0.0)
		gl_FragColor=c0;
	else
	{*/
	//	float t0=(d-radius)/radius;//abs(-texture2D(pos, texcoord).z*0.001-0.5);
		//t0=clamp(t0,0.0,1.0);
		/*float t1=1.0-clamp( (d-10000.0)/20000.0, 0.0, 1.0);
		float t=t0*t1;*/
		
		gl_FragColor=mix(c1,c0,/*t0*/d*d);//(c1*d) + (c0*(1.0-d));
	//}
}
