uniform			sampler2DRect sampler;

void main()
{
	vec4			sum		=	vec4(0.0);
	
	vec2			c0	=	vec2(gl_TexCoord[0]);
	vec2			c1	=	vec2(gl_TexCoord[1]);
	vec2			c2	=	vec2(gl_TexCoord[2]);
	vec2			c3	=	vec2(gl_TexCoord[3]);
	vec2			c4	=	vec2(gl_TexCoord[4]);
	vec2			c5	=	vec2(gl_TexCoord[5]);
	vec2			c6	=	vec2(gl_TexCoord[6]);
	vec2			c7	=	vec2(gl_TexCoord[7]);
	
	sum 			=	texture2DRect(sampler, c0);
	sum 			+=	texture2DRect(sampler, c1);
	sum 			+=	texture2DRect(sampler, c2);
	sum 			+=	texture2DRect(sampler, c3);
	sum 			+=	texture2DRect(sampler, c4);
	sum 			+=	texture2DRect(sampler, c5);
	sum 			+=	texture2DRect(sampler, c6);
	sum 			+=	texture2DRect(sampler, c7);

	gl_FragColor	= sum		* 	(1.0 / 8.0);
}
