How to use HDRP mixed cache shadow map correctly?

This feature on first glance seems good. More way to optimize shadow. But in real game environment that’s larger than a simple room, with many light, the cached shadow map get filled up pretty quickly, and then all other lights wouldn’t fit into the atlas anymore. and then…what? Is user expected to manage this themself?
1.Disable light that doesn’t have any shadow on the view to free up space on the cached shadow map?
2.Rescale the shadow map resolution of light that is far away so it doesn’t take up too much space in cached shadow map?
3.Does mixed light(with Distance shadowmask) automatically unreserve its spot on the cached shadowmap if it is fallback on shadow mask?

all this seems super hard for me and I’m struggling to find the use case for this feature currently. All my scenes need to support way more light than I can fit in to the cached shadow map. and I don’t know how to do #2 or #1

1 Like

Hi, yes as you highlight the shadow cache system isn’t an automtic system to allow you to feed any numbers of shadowed lights. It is an additional tool to improve performance, but not a silver bullet depending on your scenario.
What most game are doing with this system is some kind of management layer, where they define manually which lights need to be cached or not and decided when to refresh them via script.

Typical dungeon game with lot of room will have such management layer, where cached light will be enabled on room loading /open/close door etc… We have seen great performance improvement on game mastering the system.

1 Like