PCF(Percentage closer filer): Because texture precision is not enough to confirm lossless. Therefore, we can reference the neighbor pattern. I use four corner texel( left-top, right-top, left-bottom, right-bottom) and the current texel. float2 texCoord; float4 p; texCoord.x = shadowPos.x + 1/shadowMapSize; texCoord.y = shadowPos.y - 1/shadowMapSize; p.x = tex( sm, texCoord ); // left-top texCoord.xy = shadowPos.xy + 1/shadowMapSize; p.y = tex( sm, texCoord ); // right-top texCoord.xy = shadowPos.xy - 1/shadowMapSize; p.z = tex( sm, texCoord ); // left-bottom texCoord.x = shadowPos.x + 1/shadowMapSize; texCoord.y = shadowPos.y - 1/shadowMapSize; p.w