Bad Performance with Nanite Masked WPO in UE5.4.2

My project has serious performance issues after upgrading from UE5.3.2 to UE5.4.2.
There are many trees in my demo. When I move the camera close to leaves (Nanite Masked + WPO), the frame rate drops significantly due to a huge increase in ShadowDepths (VSM) time.

Atfer using Renderdoc to capture frames, I found that UE5.4.2 uses MeshShader when rendering VSM (HW rasterize) for leaves, which is very different from UE5.3.
From the screenshots, we can see that UE5.4 HW rasterize takes much time than UE5.3 (32.9ms vs 4.5ms)


Is this a performance issue with UE5.4 meshshader?
Is there any solution for the problem?

Hi, it seems the bad performance is caused by WPO for some reason(maybe because of the large coordinate changes); if I disable the WPO, the performance is closed.
Try not to use nanite on meshes with WPO and Masked materials.

1 Like

Foliage with full geometry will give you much better performance, I highly recommend it. If you’re using Nanite, that is. You can also set the shadow cache to rigid or static to get a big boost - I usually do this for smaller foliage but depending on the scene it works fine with big trees too.


Agreed, with nanite, it’s far better to not used masked materials at all and just model the leaf geometry.