Why ShadowDepthZ is so highres on mobile?

With memrepor I found that we have shadow depth of enormous size:
16.000MB 2048x2048 1mip(s) ShadowDepthZ (ShadowDepth)

How it can be limited? :slight_smile:

Hi Vladamir, the resolution of the shadowmap is driven by the cvar r.Shadow.MaxResolution, which is applied based on your scalability settings. Take a look a basescalability.ini. These are the settings for shadow quality 3, which is the highest setting:

[ShadowQuality@3]
r.LightFunctionQuality=1
r.ShadowQuality=5
r.Shadow.ForceSingleSampleShadowingFromStationary=0
r.Shadow.CSM.MaxCascades=4
r.Shadow.MaxResolution=2048

If you reduce the shadow quality to 2 or 1, you’ll get a resolution of 1024x1024, which is probably more reasonable on mobile.

Of course you can modify the values in baseScalability.ini if you want to, you can provide your own game-specific DefaultScalability.ini file which overrides any of the settings you want.

Great, thank you!