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

void main()
{	
	float lum0=texture2D(tex, t0).r;
	float lum1=texture2D(tex, t1).r;
	float lum2=texture2D(tex, t2).r;
	float lum3=texture2D(tex, t3).r;
	float lum4=texture2D(tex, t4).r;
	float lum5=texture2D(tex, t5).r;
	float lum6=texture2D(tex, t6).r;
	float lum7=texture2D(tex, t7).r;
	//float lum8=texture2D(tex, t0-vec2(0.333,0.333)).r;

	gl_FragColor.x = max(0.0,(lum0+lum1+lum2+lum3+lum4+lum5+lum6+lum7)/8.0);
}