# Ways to dynamically scale VSM for flatter performance 

**URL:** <https://forums.unrealengine.com/t/ways-to-dynamically-scale-vsm-for-flatter-performance/2670416>\
**Category:** Rendering\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [September 26, 2025, 11:54pm UTC](https://forums.unrealengine.com/t/ways-to-dynamically-scale-vsm-for-flatter-performance/2670416 "2025-09-26T23:54:03Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Sam\_Lapere](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sam\_Lapere](https://forums.unrealengine.com/u/Sam_Lapere)\
**Post date:** [October 1, 2025, 11:21pm UTC](https://forums.unrealengine.com/t/ways-to-dynamically-scale-vsm-for-flatter-performance/2670416/5 "2025-10-01T23:21:00Z")

</div>

Hi,

as far as I can tell, it’s not possible to pregenerate VSM tile caches if the camera moves in unpredictable ways, but Unreal 5.4 has a feature called Separate Static Caching which optimizes cache invalidation behavior for static geometry (please see [this link](https://dev.epicgames.com/documentation/en-us/unreal-engine/virtual-shadow-maps-in-unreal-engine?application_version=5.4#separatestaticcaching) for details on how to benefit from this feature).

Regarding implementing the dynamic shadow resolution idea, I would measure the difference in degrees in the Z-direction between the previous and current frame (or equivalent for translation in the XY plane) and dynamically set the value of **r.Shadow.Virtual.ResolutionLodBiasDirectional** (or **r.Shadow.Virtual.ResolutionLodBiasLocal** depending on the type of light) each frame within a certain clamped range e.g. from -0.5 for still camera to 3 when the camera is rotating quickly, based on the degree of movement.

Could you also check if your scene contains a SceneCaptureComponent2D as that may cause cache invalidations when rotating the camera according to [this thread](https://forums.unrealengine.com/t/all-vsm-cache-being-invalidated-when-rotating-camera/2154038) (this may or may not be related to the issue you are seeing).

Thanks,

Sam

---

_[View the full topic](https://forums.unrealengine.com/t/ways-to-dynamically-scale-vsm-for-flatter-performance/2670416)._
