Description

When objects are placed behind or beneath a masked landscape and r.Lumen.HardwareRayTracing.SurfaceCacheAlphaMasking is enabled, the direct light evaluation is incorrect.

There are two workarounds, but one of them only works in UE 5.6 and up:

  • in UE 5.5, setting Context.bAcceptFirstHitAndEndSearch to false in LumenSceneDirectLightingHardwareRayTracing.usf on line 318 fixes the issue. The licensee found that this happens because sometimes the raytracing ends up evaluating the landscapes "anyhit" shader first, then aborting the trace. This leads to a retrace from the hit location on the landscape, which in turn causes the incorrect lighting. Note that this probably only needs to be disabled when r.Lumen.HardwareRayTracing.SurfaceCacheAlphaMasking is enabled.
  • in UE 5.6 and up, there is r.RayTracing.Geometry.Landscape.VertexMask, a new CVar that also fixes this issue when enabled
Steps to Reproduce
  • Open the repro project (alternatively, create a landscape and a simple material with Blend Mode Masked with a Landscape Visibility Mask node connected to the Opacity Mask input, then use the Landscape Visibility brush to mask out a heightened portion of the landscape and place a simple shadow casting object behind the landscape)
  • Open Lumen visualization
  • Set r.Lumen.HardwareRayTracing.SurfaceCacheAlphaMasking to 1
  • Observe that direct light passes through the shadow caster

Have Comments or More Details?

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

0
Login to Vote

Unresolved
ComponentUE - Graphics Features - Lumen
Affects Versions5.5
CreatedOct 5, 2025
UpdatedOct 7, 2025
View Jira Issue