uniform sampler2D 	tex;
varying vec4		t1,t2,t3,t4;
varying vec2		t0;

void main()
{
	float 	depth;
	
	depth=texture2D(tex, t0).r;
	depth=min(depth,texture2D(tex, t1.xy).r);
	depth=min(depth,texture2D(tex, t1.zw).r);
	depth=min(depth,texture2D(tex, t2.xy).r);
	depth=min(depth,texture2D(tex, t2.zw).r);	
	depth=min(depth,texture2D(tex, t3.xy).r);
	depth=min(depth,texture2D(tex, t3.zw).r);	
	depth=min(depth,texture2D(tex, t4.xy).r);
	depth=min(depth,texture2D(tex, t4.zw).r);

	gl_FragColor.r = depth;
}