Files
UnrealEngineUWP/Engine/Source/Runtime/Windows
jason hoerner 16c6a37fa6 Scene capture: Lumen support for Scene Capture 2D, Lumen cache resolution adjustment, Texture Editor displays GPU memory usage for Scene Capture 2D
By default Lumen is disabled for Scene Capture to save memory, but can be enabled via post process override settings.  The memory usage display was important when adding this feature, to give feedback to the user of the memory impact for enabling Lumen.  It's also just generally useful besides.  Lumen costs 340 MB to enable if view specific Lumen scene data is enabled at low quality (half resolution page buffer), or 640 MB at high quality (full resolution page buffer).  Besides memory statistics in the Texture Editor, there is an editor specific command which dumps per-resource sizes to log (r.SceneCapture.DumpMemory), useful for investigating where the memory is going.

Lumen requires persistent state to function properly, so Lumen is disabled if bCaptureEveryFrame and bAlwaysPersistRenderingState are both false.  I decided not to allow Lumen for Scene Capture Cube, due to high memory cost, poor CPU performance, and lighting seams across the faces.  I'm hoping in the future to run Scene Capture Cube as a single scene render call (effectively 6-way split screen for the 6 cube map faces), and have certain rendering passes run as a single omnidirectional pass.  Perhaps Lumen could use a single radiance cache for all 6 faces, rather than 6 separate caches, reducing memory, significantly improving performance, and hopefully solving lighting seams.

I rounded out the set of functions that handle per-view VSM and Lumen caches, to include functionality to remove the caches (necessary to allow the per-view Lumen cache to be toggled back off), and query their presence.

#jira UE-148665
#rb Krzysztof.Narkowicz Daniel.Wright zach.bethel
#preflight 6307cf561615ec0db52700e3

[CL 21594503 by jason hoerner in ue5-main branch]
2022-08-26 13:59:08 -04:00
..