#extension GL_EXT_shadow_samplers : require
#extension GL_EXT_shader_texture_lod : require

uniform sampler2D tex;
uniform sampler2DShadow shadowmap;

varying highp vec4 uv;

void main() {
	lowp vec4 c;
	c = texture2DProj(tex, uv);
	c += texture2DProj(tex, uv.xyz);
	c += texture2DProjLodEXT(tex, uv, 1.0);
	c += texture2DProjLodEXT(tex, uv.xyz, 1.0);

	c += vec4(shadow2DEXT(shadowmap, uv.xyz));
	c += vec4(shadow2DProjEXT(shadowmap, uv));

	gl_FragColor = c;
}
