Description

While setting up whole scene shadows, CasterOuterFrustum is used to cull shadow casters from PrimitiveOctree. CasterOuterFrustum doesn't extend far back enough, which means that if an octree node fits tightly around a primitive, it's possible the octree node fails the intersection test and therefore gets culled incorrectly. This causes missing shadow casters behind the camera, even when they are in the CSM range.

Steps to Reproduce
  • In code, on Engine\Source\Runtime\Renderer\Public\PrimitiveSceneInfo.h line 831, change MaxElementsPerLeaf = 256 to MaxElementsPerLeaf = 1. This will make it easier to setup a scene where the octree fits tightly around the primitives in the next steps. You can use "r.shadow.visualizeprimitivetree 1" to show the nodes of the primitivetree.
  • Make sure VSMs are disabled.
  • Create a blank scene.
  • Create a cube at (X=-3500.000000,Y=-1500.000000,Z=4500.000000)
  • Create a sphere at (X=-3500.000000,Y=-500.000000,Z=4500.000000)
  • Add a plane at 0,0,0 to receive shadows from the previously created primitives.
  • Add a directional light. Make sure it casts shadows correctly onto the plane.
  • Move the camera between the shadow casters and receiver. Notice how when the cube shadow first disappears, hiding the sphere makes it show up again.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-224220 in the post.

0
Login to Vote

Fixed
ComponentUE - Graphics Features - Shadows
Affects Versions5.45.05.15.25.35.5
Target Fix5.5
Fix Commit36328015
CreatedSep 13, 2024
ResolvedSep 17, 2024
UpdatedSep 25, 2024
View Jira Issue