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

void main()
{
	vec4 	color;
	vec4 	base;
	base=texture2D(tex, t0);
	color=/*max(color,*/texture2D(tex, t1.xy);//);
	color+=/*max(color,*/texture2D(tex, t2.xy);//);
	color+=/*max(color,*/texture2D(tex, t3.xy);//);
	color+=/*max(color,*/texture2D(tex, t4.xy);//);	
	//color+=/*max(color,*/texture2D(tex, vec2(0.0,t1.y));//);
	//color+=/*max(color,*/texture2D(tex, vec2(0.0,t2.y));//);
	//color+=/*max(color,*/texture2D(tex, vec2(t3.x,0.0));//);
	//color+=/*max(color,*/texture2D(tex, vec2(t4.x,0.0));//);	
/*	color=max(color,texture2D(tex, t1.zw));
	color=max(color,texture2D(tex, t2.zw));
/*	color=max(color,texture2D(tex, t3.zw));
	color=max(color,texture2D(tex, t4.zw));	*/
	color*=0.25;
	color=(base+color)*0.5;
	
	gl_FragColor =  color;
}
