r.Lumen.ScreenProbeGather.Temporal.RejectBasedOnNormal
r.Lumen.ScreenProbeGather.Temporal.RejectBasedOnNormal
#Overview
name: r.Lumen.ScreenProbeGather.Temporal.RejectBasedOnNormal
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether to reject history lighting based on their normal. Increases cost of the temporal filter but can reduce streaking especially around character feet.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Lumen.ScreenProbeGather.Temporal.RejectBasedOnNormal is to control whether to reject history lighting based on their normal in the Lumen screen probe gather process. This setting is part of Unreal Engine 5’s Lumen global illumination system, specifically for the screen probe gathering and temporal filtering aspects.
This setting variable is primarily used in the Renderer module, specifically within the Lumen subsystem. It’s part of the screen probe gathering process, which is a crucial component of Lumen’s real-time global illumination calculations.
The value of this variable is set through the Unreal Engine console variable system. It’s defined as a TAutoConsoleVariable with an initial value of 0, meaning it’s disabled by default.
This variable interacts closely with its associated variable CVarLumenScreenProbeTemporalRejectBasedOnNormal. They share the same value and purpose.
Developers must be aware that enabling this feature (by setting it to a non-zero value) can increase the cost of the temporal filter. However, it can also reduce streaking artifacts, especially noticeable around character feet.
Best practices when using this variable include:
- Only enable it if streaking artifacts are noticeable and problematic in your scene, particularly around character feet or other moving objects.
- Monitor performance impact when enabling this feature, as it increases the cost of the temporal filter.
- Use in conjunction with other Lumen settings to achieve the best balance between visual quality and performance.
Regarding the associated variable CVarLumenScreenProbeTemporalRejectBasedOnNormal:
The purpose of CVarLumenScreenProbeTemporalRejectBasedOnNormal is identical to r.Lumen.ScreenProbeGather.Temporal.RejectBasedOnNormal. It’s the actual console variable implementation that controls the feature.
This variable is used in the Renderer module, specifically in the LumenScreenProbeGather namespace.
The value is set when the engine initializes the console variables, with a default value of 0.
It directly interacts with the UseRejectBasedOnNormal function, which checks if this feature should be used.
Developers should be aware that this is the actual variable checked in the code to determine if the feature is enabled. Any runtime changes to this variable will immediately affect the rendering process.
Best practices include using the r.Lumen.ScreenProbeGather.Temporal.RejectBasedOnNormal console command to modify this value during runtime for testing purposes, and then applying the optimal value in the project settings for production builds.
#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:194
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarLumenScreenProbeTemporalRejectBasedOnNormal(
TEXT("r.Lumen.ScreenProbeGather.Temporal.RejectBasedOnNormal"),
0,
TEXT("Whether to reject history lighting based on their normal. Increases cost of the temporal filter but can reduce streaking especially around character feet."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
float GLumenScreenProbeRelativeSpeedDifferenceToConsiderLightingMoving = .005f;
#Associated Variable and Callsites
This variable is associated with another variable named CVarLumenScreenProbeTemporalRejectBasedOnNormal
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:193
Scope: file
Source code excerpt:
);
static TAutoConsoleVariable<int32> CVarLumenScreenProbeTemporalRejectBasedOnNormal(
TEXT("r.Lumen.ScreenProbeGather.Temporal.RejectBasedOnNormal"),
0,
TEXT("Whether to reject history lighting based on their normal. Increases cost of the temporal filter but can reduce streaking especially around character feet."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:417
Scope (from outer to inner):
file
namespace LumenScreenProbeGather
function bool UseRejectBasedOnNormal
Source code excerpt:
{
return GLumenScreenProbeGather != 0
&& CVarLumenScreenProbeTemporalRejectBasedOnNormal.GetValueOnRenderThread() != 0;
}
}
int32 GRadianceCacheNumClipmaps = 4;
FAutoConsoleVariableRef CVarRadianceCacheNumClipmaps(
TEXT("r.Lumen.ScreenProbeGather.RadianceCache.NumClipmaps"),