uniform sampler2D	shadowmapMask;
uniform vec2		invSize;
varying vec2 		texcoord;

void main()
{
	float egde;
	egde += texture2D(shadowmapMask, texcoord.st + vec2(0.0, -invSize.y)).r;
	egde += texture2D(shadowmapMask, texcoord.st + vec2(-invSize.x, 0.0)).r,
	egde += texture2D(shadowmapMask, texcoord.st + vec2(invSize.x, 0.0)).r,
	egde += texture2D(shadowmapMask, texcoord.st + vec2(0.0, invSize.y)).r;
	egde*=0.25;
	if(egde>0.0 && egde<1.0) 
		egde=0.5;
	gl_FragColor.r=egde;
}
