r.Lumen.ScreenProbeGather.Temporal
r.Lumen.ScreenProbeGather.Temporal
#Overview
name: r.Lumen.ScreenProbeGather.Temporal
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether to use a temporal filter
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Lumen.ScreenProbeGather.Temporal is to enable or disable a temporal filter for the Lumen screen probe gather process in Unreal Engine 5’s rendering system. This setting is part of the global illumination and lighting subsystem, specifically the Lumen technology.
The Unreal Engine subsystem that relies on this setting variable is the Lumen renderer, which is responsible for real-time global illumination and reflections. It’s particularly used in the screen probe gathering process, which is a technique used to capture and process lighting information in the scene.
The value of this variable is set through a console variable (CVar) system, as seen in the code:
FAutoConsoleVariableRef CVarLumenScreenProbeTemporalFilter(
TEXT("r.Lumen.ScreenProbeGather.Temporal"),
GLumenScreenProbeTemporalFilter,
TEXT("Whether to use a temporal filter"),
ECVF_Scalability | ECVF_RenderThreadSafe
);
This variable interacts with the GLumenScreenProbeTemporalFilter
global variable, which is used to control the actual behavior in the rendering code.
Developers must be aware that enabling this filter can improve the stability and quality of the lighting over time, potentially reducing flickering or other temporal artifacts. However, it may also introduce some latency in how quickly lighting changes are reflected in the scene.
Best practices when using this variable include:
- Experimenting with it enabled and disabled to find the right balance between image stability and responsiveness for your specific scene.
- Considering performance implications, as temporal filtering can have some performance cost.
- Using it in conjunction with other Lumen settings to achieve the desired lighting quality and performance.
The associated variable GLumenScreenProbeTemporalFilter
is directly controlled by the CVar. It’s used in the rendering code to determine whether to apply the temporal filter:
if (GLumenScreenProbeTemporalFilter)
{
UpdateHistoryScreenProbeGather(
GraphBuilder,
View,
SceneTextures,
LumenCardRenderer.bPropagateGlobalLightingChange,
DiffuseIndirect,
BackfaceDiffuseIndirect,
RoughSpecularIndirect,
ComputePassFlags);
// ... (update output textures)
}
This variable is checked to decide whether to call the UpdateHistoryScreenProbeGather
function, which presumably applies the temporal filtering to the screen probe data. Developers should be aware that this directly affects the rendering pipeline and can influence both visual quality and performance.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:147
Scope: file
Source code excerpt:
int32 GLumenScreenProbeTemporalFilter = 1;
FAutoConsoleVariableRef CVarLumenScreenProbeTemporalFilter(
TEXT("r.Lumen.ScreenProbeGather.Temporal"),
GLumenScreenProbeTemporalFilter,
TEXT("Whether to use a temporal filter"),
ECVF_Scalability | ECVF_RenderThreadSafe
);
int32 GLumenScreenProbeClearHistoryEveryFrame = 0;
#Associated Variable and Callsites
This variable is associated with another variable named GLumenScreenProbeTemporalFilter
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/IndirectLightRendering.cpp:870
Scope (from outer to inner):
file
function void FDeferredShadingSceneRenderer::DispatchAsyncLumenIndirectLightingWork
Source code excerpt:
const bool bAsyncComputeReflections = LumenReflections::UseAsyncCompute(ViewFamily);
extern int32 GLumenVisualizeIndirectDiffuse;
extern int32 GLumenScreenProbeTemporalFilter;
extern FLumenGatherCvarState GLumenGatherCvars;
if (!Lumen::UseAsyncCompute(ViewFamily)
|| !bAsyncComputeDiffuseIndirect
|| GLumenVisualizeIndirectDiffuse
|| ViewFamily.EngineShowFlags.VisualizeLightCulling)
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:145
Scope: file
Source code excerpt:
);
int32 GLumenScreenProbeTemporalFilter = 1;
FAutoConsoleVariableRef CVarLumenScreenProbeTemporalFilter(
TEXT("r.Lumen.ScreenProbeGather.Temporal"),
GLumenScreenProbeTemporalFilter,
TEXT("Whether to use a temporal filter"),
ECVF_Scalability | ECVF_RenderThreadSafe
);
int32 GLumenScreenProbeClearHistoryEveryFrame = 0;
FAutoConsoleVariableRef CVarLumenScreenProbeClearHistoryEveryFrame(
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:2278
Scope (from outer to inner):
file
function FSSDSignalTextures FDeferredShadingSceneRenderer::RenderLumenScreenProbeGather
Source code excerpt:
DenoiserOutputs.Textures[2] = RoughSpecularIndirect;
if (GLumenScreenProbeTemporalFilter)
{
UpdateHistoryScreenProbeGather(
GraphBuilder,
View,
SceneTextures,
LumenCardRenderer.bPropagateGlobalLightingChange,