Do you know if there plans to address it for 5.9? Or will work for this happen in UE6 branch?
We don’t have any plans currently for this in 5.9 that I can see.
could you provide more info on the r.Shadow.Virtual.DynamicRes CVars
r.Shadow.Virtual.DynamicRes.* are a family of CVars introduced for the Witcher demo that provide a new VSM throttling/dynres system that allows for trading quality for performance when the Nanite ShadowDepths gets too expensive, by biasing resolution LOD. The perf gain depends on how aggressively throttling is applied, and what the max allowed bias is.
When enabled, VSM Nanite ShadowDepths performance is monitored. When a performance threshold is reached, VSM resolution ramps down by biasing the LOD up.
The bias is determined per VSM with a heuristic based on historical nanite cluster counts, i.e. expensive shadow maps are biased more than cheap ones (when data is available).
You can see the status of throttling in the vsm stats view (r.shadow.virtual.showstats 1) and the clipmap visualization viewmode.
The performance target is set with one of two cvars:
- r.Shadow.Virtual.DynamicRes.TimeBudgetMs: use the DynamicRes system to time ShadowDepths, and aim to get nanite shadowdepths to this value. Requires DynamicResolution to be supported and active.
- r.Shadow.Virtual.DynamicRes.LoadBudget: estimate global ShadowDepths cost based on Nanite cluster data. Can be less accurate, but works everywhere (also in editor).
The maximum resolution bias is controlled with r.Shadow.Virtual.DynamicRes.MaxResolutionLodBias (same as the page pool pressure bias).
There are two additional cvars to control bias for directional and local lights separately (r.Shadow.Virtual.DynamicRes.MaxComputeResolutionLodBiasDirectional, r.Shadow.Virtual.DynamicRes.MaxComputeResolutionLodBiasLocal)
This system is likely most effective in scenes with lots of invalidation, as biasing may mark pages that were previously unmarked.
The system is focused on Nanite performance, as non-nanite sees less benefit from scaling down resolution, and would require a different policy.
Because this system works with smoothed historical data, it is also not designed to mitigate performance spikes (e.g. camera cut).
r.Shadow.Virtual.DynamicRes.LoadBudget: Fallback heuristic — scales bias off estimated draw load. Ignored when TimeBudgetMs is active. (Experimental) A setting of 0 is throttle off, 2 normal throttle, 1 stronger throttle, we used 1.2 - 1.5 in some scenes in the Witcher demo.
r.Shadow.Virtual.DynamicRes.MaxComputeResolutionLodBiasDirectional: As compute-time cost limits are approached, VSM resolution ramps down by biasing the LOD up. Per-type cap, directional lights. Effective = min(this, MaxResolutionLodBias). Used 0.2 in the Witcher demo in some scenes
Related CVars
- r.Shadow.Virtual.MaxPhysicalPages: pool size, the denominator everything keys off
- r.Shadow.Virtual.ResolutionLodBiasLocal / Directional: static artist-set bias, stacked on top of dynamic
- r.Shadow.Virtual.AllocatePagePoolAsReservedResource (default 1) — reserved-resource pool to cut fragmentation
There hasn’t been a lot of further development on VSM DynamicRes but it was key to us not dropping frames in some scenes on the Witcher demo where we targeted 60hz.
[Attachment Removed]