Why do cached point light shadows still have a massive performance cost? No GPU cost improvements

I have a few point lights with shadows on, extremely low res 170.
shadow update mode is set to on enable, and yet the cost is still significant compared to the same lights with disabled shadows. Actually, it doesn’t give any gains for the GPU, based on the built-in GPU profiler module.

Without shadows: (GPU cost)
Deferred lighting: 3.1ms
Volumetric lighting: 1.0ms

With shadows (every frame) (GPU cost):
Deferred lighting: 11ms
Volumetric lighting: 1.8ms

With shadows (on enable only) (GPU cost):
Deferred lighting: 11ms
Volumetric lighting: 1.8ms

There’s no noticeable improvement on the GPU, I can see improvements for the CPU.
Is this expected? If so, why? is it a limitation, because from my experience with cached shadows in other engines it usually provides big perf gains for the GPU as well.

Tested in-editor only. 2021.3.11
I really need those shadows :smile:

edit: updated, check first post

little findings: High quality filtering for point light shadows has a way bigger cost then I thought :smile:
So, when using medium filtering, shadow caching does give a noticeable GPU improvement!

when using high quality shadow filtering, it seems caching does actually improve the GPU Cost of shadows specifically. But when shadows are enabled, high filtering adds a massive performance increase to ‘deferred lighting’ that isn’t affected by caching or not, if shadows are on, the cost will be there.

3 Likes

What I dont get is why does the high filtering adds a giant cost to deferred lighting itself.

That’s the cost of sampling the shadow maps several times per pixel to smooth the shadows, for each shadow-enabled light that affects that pixel.