SceneCaptureComponent2D destroys shared Lumen Radiosity atlases every frame, breaking temporal accumulation in the main view

Summary

A USceneCaptureComponent2D with bCaptureEveryFrame = true and bRenderInMainRenderer

=false causes FLumenSceneData::IndirectLightingAtlas and RadiosityNumFramesAccumulatedAtlas on the shared Scene->DefaultLumenSceneData to be set to nullptr every frame.

This permanently resets Lumen Radiosity temporal accumulation for the main view, producing severe indirect-lighting flicker — most visibly in Lumen Reflections on water. Direct lighting is unaffected, which makes the issue look like Radiosity noise rather than a resource-lifetime bug.

Engine version: UE 5.8.1

Fix we tested

Guarding the destructive branch with the bLumenActive flag already computed at the top of the same function resolves the issue completely:

else
{
    if (bLumenActive)
    {
        LumenSceneData->IndirectLightingAtlas = nullptr;
        LumenSceneData->RadiosityNumFramesAccumulatedAtlas = nullptr;
    }
}

With this change, r.Lumen.Visualize 24 saturates and stays stable, and the GI flicker — including the reflection flicker on water — is gone.We could not identify a memory regression from this change:

Questions

  1. Is the unconditional nulling intended? It appears to conflate two different meanings of “this renderer did not produce the atlases”: “nobody needs them anymore” (safe to release) versus “this renderer simply isn’t doing Lumen work” (must not release).
  2. Should a renderer that performs no Lumen work be allowed to decide the lifetime of scene-shared Lumen resources at all?
  3. A very similar hazard is explicitly guarded elsewhere, in FDeferredShadingSceneRenderer::UpdateLumenScene()
// Refresh LumenScene if some updates were ignored due to Lumen being inactive
// For scene captures, don't trigger a reupload unless the scene capture has view specific LumenSceneData (not the default data)
if (!bAnyLumenActive && (!Views[0].bIsSceneCapture || &LumenSceneData != Scene->DefaultLumenSceneData))

[Attachment Removed]

재현 방법

  • Project with Lumen GI enabled (Radiosity on — default).
  • Add a USceneCaptureComponent2D
  • to any actor that exists in game:
    • Assign `Target Texture` to SceneCaptureComponent
    • bCaptureEveryFrame = true
    • CaptureSource = SCS_SceneDepth (other sources reproduce as well)
    • bRenderInMainRenderer = false (default)
    • Post process settings left at defaults
  • Play in PIE or a packaged build.

[Attachment Removed]

Thank you for reporting this issue, this does look like an unintentional regression from 5.7 and we’ll likely implement a fix with logic similar to what you see in UpdateLumenScene(). I’ve created the following issue which should be visible publicly soon for tracking https://issues.unrealengine.com/issue/UE\-396764

[Attachment Removed]