	uniform samplerRECT map_diffuse;
	
	varying vec3 normal;	
	
	void main()
	{
		float intensity;
		vec4 color;
		vec3 n = normalize(normal);

		intensity = dot(vec3(gl_LightSource[0].position),n);

		vec4 basecColor=texRECT(map_diffuse, vec2(gl_TexCoord[0].s,gl_TexCoord[0].t));

		if(intensity > 0.7)
			color = basecColor;
			else
		if(intensity > 0.4)
			color = basecColor*0.8;
		else
		if(intensity > 0.2)
		{
			if(mod(floor(gl_FragCoord.y),2.0)>0.5 )
				color = basecColor*0.3;
			else
				color = basecColor*0.7;
		}
		else
			color = basecColor*0.3;


		gl_FragColor = color;
	} 
