//varying vec2 		t0,t1,t2,t3,t4,t5,t6,t7;
uniform sampler2D 	tex;
varying vec2 		texcoord;
uniform float		ofs;

float lum(vec3 color)
{
	return dot(color,vec3(0.27, 0.67, 0.06));	
}

void main()
{
	float lum0=/*log(0.1+*/lum(texture2D(tex, texcoord/*+vec2(ofs,ofs)*/).rgb);//);
	/*float lum1=log(0.1+lum(texture2D(tex, texcoord+vec2(-ofs,ofs)).rgb));
	float lum2=log(0.1+lum(texture2D(tex, texcoord+vec2(ofs,-ofs)).rgb));
	float lum3=log(0.1+lum(texture2D(tex, texcoord+vec2(-ofs,-ofs)).rgb));
	float lum4=log(0.1+lum(texture2D(tex, texcoord+vec2(ofs,0)).rgb));
	float lum5=log(0.1+lum(texture2D(tex, texcoord+vec2(-ofs,0)).rgb));
	float lum6=log(0.1+lum(texture2D(tex, texcoord+vec2(0,ofs)).rgb));
	float lum7=log(0.1+lum(texture2D(tex, texcoord+vec2(0,-ofs)).rgb));
	float lum8=log(0.1+lum(texture2D(tex, texcoord).rgb));*/
	gl_FragColor.x = lum0;//(lum0+lum1+lum2+lum3+lum4+lum5+lum6+lum7+lum8)/9.0;
}
