
layout(location = 0, index = 0) out vec4 outcol;

uniform sampler2D tex0;
uniform vec4 resolution; //wh, 1/wh

in vec2 texcoord0_nm;


void main()
{
	vec4 ofs01 = vec4(  0.5, 0.5,  0.5, -0.5) * resolution.zwzw;
	vec4 ofs23 = vec4( -0.5, 0.5, -0.5, -0.5) * resolution.zwzw;

	vec4 sample_col = vec4(0,0,0,0);
	sample_col += texture( tex0, texcoord0_nm + ofs01.xy );
	sample_col += texture( tex0, texcoord0_nm + ofs01.zw );
	sample_col += texture( tex0, texcoord0_nm + ofs23.xy );
	sample_col += texture( tex0, texcoord0_nm + ofs23.zw );
	sample_col *= 0.25f;

	outcol = sample_col;
}
