Ugly shadows with URP ortho 3D camera

I have URP project with orthographic camera. The rendered shadow looks quite ugly. I have tried various settings but it was only worse. I’m attaching the screenshots of the shadows and my settings. Do you know if I’m missing some settings (and if yes could you point me to the docs), or the URP shadow just looks bad in ortho camera?




Thank you

1 Like

Thanks for the reply.

I cannot find any other setting related to shadows. The only other I found was Shadowmask Mode which is set to Distance Shadowmask. Could you point me to the right direction?

Yes, this could be the problem. But in ortho camera distance as a such shouldn’t have impact on the shadow quality, because it’s not like the perspective camera where more distant object are smaller.

Thanks

check the render debugger, you can see the actual shadow map camera and determine what settings affect things.

I would presume distance is the problem, it should be as low as possible.

Also the three dot menu in the header should have additional settings.

Sorry I missed an image.
I’d suggest to change the shadow distance to metric and lower the value.
With 1 cascade I often use just 10 meters. With multiple cascades up to 100.

Checked the frame debugger with settings tweaking with no success. With distance you mean camera distance or max distance setting?
My camera distance it’s dynamically set (along with near/far plane) based on the zoom and other factor (default is around 100 units). Therefor max distance should be enough to cover the shown area.

Are you using those setting with ortho or perspective camera?

I’m afraid that URP shadows doesn’t work right with ortho camera (have also found some older discussions where people had problem getting shadows to work correctly).

I meant the max distance. Which currently is at 1000 (isn’t that 10x the far clip plane)
I haven’t used Ortho in a while, but wouldn’t understand why it’s different. Does it magically solve itself on Perspective?
Could you try a max distance of 50 meters instead of 1000 percent, with 4 shadow cascades?

Assuming these are directional light shadows, not spot light

Yes, this is directional light.

I’ve tried 50 metres (needed to raise it to match the camera distance, around 200) and 4 cascades, but no luck.
Trying the perspective, it’s look nearly the same, maybe a little bit better.

I’ll try to test it more thoroughly during the weekend.

Thanks

even 50 would be pretty large, try much smaller like 5 or 10, with a game with this perspective shadow distance shouldn’t need to be that far at all.

And make sure it’s only 1 (directional) light in the scene to debug