Thanks!
I did some optimizations (virtual textures, forward rendering, screen space lighting instead of Lumen) and have good and bad news. The good news is that I got BasePass way down - only for Shadow Depths to shoot up and eat up most of the gains.
BasePass looks like this now:
And this is Shadow Depths, which now easily peaks at 5ms or more with all sorts of settings (shadow resolution, cascades) set all the way to minimum, grass dynamic/contact shadows disabled, and one light source (sun):
Ultra Dynamic Sky is involved, but I don’t think it is broken, rather it is currently the only light source. This is a weird shape for a shadow map (rectangular?) and I really don’t need 4K shadows but I don’t know how to reduce it.
And that’s 5ms with shadows set as low as I can set them. If I increase anything about shadows to sensible values, shadow depths skyrockets to 10ms or more.
This is regular shadow maps with a dynamic sun; virtual shadow maps are a total disaster.
Half of my total render time is lost to shadows. How on earth did I break this?
To be fair, my virtual texture is huge; I’m building a map at runtime and the virtual texture covers the whole map, close to the maximum dimensions of the virtual texture sampler box. But shadows aren’t drawn in most of that, and surely someone has been able to use trees without wrecking performance?