More performant Point Light Shadows?

I’ve heard some say URP is more performant than BIRP, but only if you exclude point light shadows. And the impact on my game (easily 20 FPS) rivals the impact of toggling raytraced shadows and certain games, maybe worse :stuck_out_tongue:

Is there a game plan to improve this?

3 Likes

To add to this, it would be great if you could explain why Shadows in SRP are slower than in BIRP.

2 Likes

It even feels like point light shadows are a bit extreme in BIRP. They are supposed to be expensive (6 draw calls after all) but it still baffles me just how expensive they are!

I know that it is possible to render point light shadow with only 2 draws rather than 6.

It’s less accurate but faster.

See this Godot Docs (Dual Paraboloid Mapping).

Edited: I think cached shadow is a better solution for URP to have performant shadow.

DPSM is only good for highly tesselated meshes and static non-moving shadowing point lights that are not too close to surfaces. Even so, there will always be some kind of artifact on the seam between the 2 hemispheres. This is because the pixel data in the shadowmap is stored in a non-linear space, where-as vertex shader can only do linear space transformation. I spent a good amount testing this method with moving lights, thinking it’s a holy grail for perf, but there are always unwanted artifacts. Even with hacks. DualParaboloid is better suited for backed data like cubemaps/HDRI.

Apart from that, there is also Tetrahedron shadowmapping which render 4 faces. :roll_eyes:

1 Like

Heyhey!

I mentioned in this thread that I’m currently gathering feedback/requests for shadows and improving performance of Point Light Shadows (and shadows in general) is on that list as well. So to answer your question. Yes there’s a plan to improve shadow performance but it hasn’t been fully designed right now while I’m still in the gathering phase.

We consider issues, where performance is slower on URP than BiRP, to be very high priority.
Can you file a bug report so I can investigate this?

1 Like

Thats good perhaps one consideration is screenspace point light shadows which Tales of Arise uses.

I’m surprised this isn’t already well documented, I’ve heard many mention it besides my own experience. XD

8475377--1126505--upload_2022-9-29_5-9-20.png
8475377--1126505--upload_2022-9-29_5-9-20.png

On PC and consoles there are GPU features which allow rendering to a cubemap in a single pass instead of six. It would be nice if URP would take advantage of that.

1 Like