Cascade Shadow Map octree not handling new max world size

Hi! We noticed that the object placed very far from the origins (more than 1’000’000 units) does not cast shadows from CSM consistently. When r.Shadow.UseOctreeForCulling is disabled they works so we saw that the PrimitiveOctree octree is initialized with the old UE_OLD_HALF_WORLD_MAX in FScene::FScene(UWorld* InWorld, bool bInRequiresHitProxies, bool bInIsEditorScene, bool bCreateFXSystem, ERHIFeatureLevel::Type InFeatureLevel) in RenderScene.cpp.

We tried to initialize it to the HALF_WORLD_MAX that should use the new max world size. As now we haven’t seen problems but we wanted to ask if there is a reason it has been kept with the old max size.

We are currently using 5.4 but also tested on 5.5 vanilla and github shows it is still using UE_OLD_HALF_WORLD_MAX.

This works for LocalShadowCastingLightOctree as well.

I think this is also related to the work that has been done in: [UE5 Cascaded Shadow Maps disappear at a certain offset to world [Content removed]

Steps to Reproduce
Create a new level (either open world or Basic) with a direct light on it. Place a plane scaled by 10 and a cube. Move both of them on 2’000’000 , 0 , 0 and the CSM shadow won’t be visible. Check that r.Shadow.UseOctreeForCulling is enabled. Try to disable it and it works. With 5.5 is also possible to use r.Shadow.VisualizePrimitiveOctree 1 and noticing that is not big enough to include the plane and cube.

Hello,

Thank you for reaching out.

I’ve been assigned this issue, and we will be looking into these missing shadows for you.

Hello,

Thank you for reporting this.

I can confirm this issue can be reproduced as described in the latest CL, and have opened a bug report.

We will provide a public tracker when one is available.

Hello,

You can track this issue here:

The tracker will be visible after it is approved internally at Epic Games and is publicly accessible.

If you have any further questions, please let us know.

Thank you very much!