I am using Unity but this question might not be proper to this engine.I have projected the shadow map onto this sphere but there are grazing shadows. Is it possible to avoid it or to correct it as I am using the raw depth data of the texture.Here is the pseudo-shader code.uniform sampler2D _ShadowMap;float4 shadowCoord : TEXCOORD1;// vertex shadero.shadowCoord = mul(unity_World2Shadow[0], mul(_Object2World, v.vertex));// fragment shadercolor.rgb = tex2D(_ShadowMap, i.shadowCoord);return color;
Shadow map projection issue
opengl;algorithm;shader;glsl;shadow mapping