uniform sampler2DShadow shadowMap;
uniform sampler2D Texture0;

varying vec3 normal;
varying vec4 projCoord;
	
	void main()
	{


vec4 color ;
color.rgba    = texture2D(Texture0,gl_TexCoord[0].st).rgba;


vec3 shadowUV = projCoord.xyz / projCoord.q;


	if(shadowUV.x >= 0.05 && shadowUV.y >= 0.05 && shadowUV.x <= 0.95 && shadowUV.y <= 0.95 )
   	{


	float shadowColor = shadow2D(shadowMap, shadowUV).r;
	shadowColor = clamp(shadowColor, 0.6, 1.0);
	color.rgb *= shadowColor;
	}

	//color.rgb = projCoord.xyz;

gl_FragColor = color*gl_Color;



}