UE5 VSM closeup view performance problem

I have a simple scene with trees, 120 fps without any problems, the problem starts when I get close to a tree and look practically at its leaves, then already fps drops to 80-90 and in profiler shadow depths reach 3-4 ms, on a simple scene it is not so noticeable anyway but at complex level pass even next to a tree fps already drop to 50 or even lower, the problem does not occur only with trees with megascans but also with more optimized trees, anyone met maybe such a problem?




Scalability settings: High

Did you ever find a solution for this? Thanks.

Unfortunately no, I have no idea what causes it. The trees used in the scene were from MAWI and the leaves were made using planes, maybe making a tree similar to what they did in Fortnite where each leaf is modeled would improve VSM performance, but this is a shot in the dark, I’ve never tested it myself. At worst, you have to wait for fixes in the next versions of the engine, maybe it’s a simple bug.

1 Like

A few things to help reduce the issue. However it does not completely fix it. Add these to your DefaultEngine.ini file:


the “r.Shadow.Virtual.ResolutionLodBiasDirectional=2” adjust the shadow resolution. A value of 2 is a bit blurry and jagged but offer nice gains. You may want to use a value of 1 to get nicer looking shadows. Also cap the World Position Offset setting to something like 2000 on the trees. Otherwise the WPO default of 0 will cast shadows at an infinite distance.

1 Like

The reason this happens is because VSMs rely on caching to achieve real time performance. Things like WPO based wind invalidate the cache and require shadows to be redrawn.

When you zoom in close to leaves, the entire virtual page is invalided every frame because every pixel is moving.

When you’re far, much less of the page is invalidated, because large parts of the screen are not in shadow. Also, the invalidated pages are lower resolution because they are farther away.

Close up pages are higher resolution, so when they need to be redrawn, it is more costly.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.