During cinematics we some some camera cuts. When the camera cuts to a very big nanite mesh, the shadows on the mesh look incorrect. Disabling/enabling VSM cache fixes the shadow issue (as that forces the mesh to be re-rendered into the VSM). If I mark the mesh to always invalidate shadow maps that also fixes the issue, but is not ideal for performance reasons.
What feels like its happening is that when the camera cut happens, the nanite mesh is very low quality as nanite data is not yet streamed in (This can be seen for a few frames as the mesh looks very quality until it streams in). I believe the VSM pages for the mesh get rendered while the mesh is still very low quality, and then they don’t get updated once the mesh is fully streamed in, so the shadow looks incorrect.
Could you confirm that nanite streaming will not invalidate the VSM pages? If so, what is the intended way to get around this issue (especially for camera cuts)?
I feel there must be some logic for invalidating the VSM as you move through the world, as otherwise we would be seeing shadowing artifacts elsewhere, but the above explanation is currently the only one that makes sense for the issue we have.