r.Lumen.TranslucencyVolume.TemporalReprojection
r.Lumen.TranslucencyVolume.TemporalReprojection
#Overview
name: r.Lumen.TranslucencyVolume.TemporalReprojection
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether to use temporal reprojection.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Lumen.TranslucencyVolume.TemporalReprojection is to control whether temporal reprojection is used in Lumen’s translucency volume lighting system. This setting is part of Unreal Engine 5’s Lumen global illumination system, specifically for handling lighting through translucent materials.
This setting variable is primarily used in the Renderer module of Unreal Engine 5, particularly in the Lumen subsystem. It’s referenced in the LumenTranslucencyVolumeLighting.cpp file, which is responsible for handling translucency volume lighting calculations in Lumen.
The value of this variable is set through the Unreal Engine console variable system. It’s initialized with a default value of 1 (enabled) and can be changed at runtime using console commands or through project settings.
The associated variable GTranslucencyVolumeTemporalReprojection directly interacts with this setting. It’s the C++ variable that stores the actual value used in the code logic.
Developers should be aware that this setting affects the visual quality and performance of translucent object lighting in scenes using Lumen. Enabling temporal reprojection can improve the stability and quality of lighting on translucent objects, but may have a performance cost.
Best practices when using this variable include:
- Keeping it enabled (1) for better visual quality in most scenarios.
- Considering disabling it (0) if performance is a critical issue and the visual artifacts are acceptable.
- Testing the impact on your specific scene, as the effects can vary depending on the amount and complexity of translucent objects.
Regarding the associated variable GTranslucencyVolumeTemporalReprojection:
This is an internal C++ variable that directly corresponds to the r.Lumen.TranslucencyVolume.TemporalReprojection console variable. It’s used in the rendering code to determine whether temporal reprojection should be applied to the translucency volume lighting calculations.
The variable is checked in the ComputeLumenTranslucencyGIVolume function to determine if temporal reprojection should be used. It’s combined with other conditions such as the existence of a ViewState, absence of camera cuts, and availability of history buffers.
Developers working directly with the C++ code should use this variable when they need to make decisions about applying temporal reprojection in custom rendering code related to Lumen’s translucency volume lighting.
It’s important to note that modifying this variable directly in C++ code is not recommended unless you’re making engine-level changes. Instead, the console variable should be used to control this feature in most cases.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenTranslucencyVolumeLighting.cpp:92
Scope: file
Source code excerpt:
int32 GTranslucencyVolumeTemporalReprojection = 1;
FAutoConsoleVariableRef CVarTranslucencyVolumeTemporalReprojection(
TEXT("r.Lumen.TranslucencyVolume.TemporalReprojection"),
GTranslucencyVolumeTemporalReprojection,
TEXT("Whether to use temporal reprojection."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
int32 GTranslucencyVolumeJitter = 1;
#Associated Variable and Callsites
This variable is associated with another variable named GTranslucencyVolumeTemporalReprojection
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenTranslucencyVolumeLighting.cpp:90
Scope: file
Source code excerpt:
);
int32 GTranslucencyVolumeTemporalReprojection = 1;
FAutoConsoleVariableRef CVarTranslucencyVolumeTemporalReprojection(
TEXT("r.Lumen.TranslucencyVolume.TemporalReprojection"),
GTranslucencyVolumeTemporalReprojection,
TEXT("Whether to use temporal reprojection."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
int32 GTranslucencyVolumeJitter = 1;
FAutoConsoleVariableRef CVarTranslucencyVolumeJitter(
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenTranslucencyVolumeLighting.cpp:885
Scope (from outer to inner):
file
function void FDeferredShadingSceneRenderer::ComputeLumenTranslucencyGIVolume
Source code excerpt:
const bool bUseTemporalReprojection =
GTranslucencyVolumeTemporalReprojection
&& View.ViewState
&& !View.bCameraCut
&& !View.bPrevTransformsReset
&& ViewFamily.bRealtimeUpdate
&& TranslucencyGIVolumeHistory0
&& TranslucencyGIVolumeHistory0->Desc == LumenTranslucencyGIDesc0;