I’m trying to make my custom unlit shader recieve shadows in URP.
To do this I get the main light via the shadow coord in the fragment shader:
Light mainLight = GetMainLight(i.shadowCoord);
The shadow coord is fetched like this:
o.shadowCoord = TransformWorldToShadowCoord(worldPos);
And for testing I simply do this:
return mainLight.shadowAttenuation;
But as you can see, there are these white and black rings. They are caused by the shadow cascades but I don’t know how to get rid of them.
Any ideas?
Result: