r.LumenScene.Radiosity.Temporal
r.LumenScene.Radiosity.Temporal
#Overview
name: r.LumenScene.Radiosity.Temporal
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether to use temporal super sampling on Radiosity. Increases quality, but also adds latency to the speed that lighting changes propagate, and animated noise in the results.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.LumenScene.Radiosity.Temporal is to control whether temporal super sampling is used on Radiosity in the Lumen lighting system. This setting is part of Unreal Engine 5’s global illumination solution, specifically the Lumen Scene Radiosity component.
This setting variable is primarily used in the Renderer module, specifically within the Lumen subsystem. It’s referenced in the LumenRadiosity.cpp file, which is part of the Lumen global illumination implementation.
The value of this variable is set through the Unreal Engine console variable system. It’s initialized with a default value of 1 (enabled) but can be changed at runtime using console commands or through project settings.
The associated variable GLumenRadiosityTemporalAccumulation directly interacts with r.LumenScene.Radiosity.Temporal. They share the same value, and GLumenRadiosityTemporalAccumulation is used in the C++ code to determine if temporal accumulation should be applied.
Developers should be aware that enabling this feature (which is the default) increases the quality of the global illumination, but it comes with trade-offs. It adds latency to the propagation of lighting changes and can introduce animated noise in the results. These effects should be considered when deciding whether to enable or disable this feature for a particular project or scene.
Best practices when using this variable include:
- Evaluate the performance impact in your specific scenes.
- Consider disabling it if rapid lighting changes are crucial for gameplay or visual fidelity.
- Be aware of the potential animated noise and assess if it’s acceptable for your project’s visual style.
- Use in conjunction with GLumenRadiosityTemporalMaxFramesAccumulated to fine-tune the temporal accumulation behavior.
Regarding the associated variable GLumenRadiosityTemporalAccumulation:
- Its purpose is to act as the C++ representation of the r.LumenScene.Radiosity.Temporal console variable.
- It’s used within the Lumen Radiosity system to determine if temporal accumulation should be applied.
- Its value is set by the console variable system and can be changed at runtime.
- It interacts directly with the UseTemporalAccumulation() function in the LumenRadiosity namespace.
- Developers should be aware that this variable is used in conditional statements to enable or disable temporal accumulation features.
- Best practices include using this variable for runtime checks of the temporal accumulation state and potentially allowing it to be toggled for different quality settings or performance profiles.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenRadiosity.cpp:136
Scope: file
Source code excerpt:
int32 GLumenRadiosityTemporalAccumulation = 1;
FAutoConsoleVariableRef CVarLumenRadiosityTemporalAccumulation(
TEXT("r.LumenScene.Radiosity.Temporal"),
GLumenRadiosityTemporalAccumulation,
TEXT("Whether to use temporal super sampling on Radiosity. Increases quality, but also adds latency to the speed that lighting changes propagate, and animated noise in the results."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
int32 GLumenRadiosityTemporalMaxFramesAccumulated = 4;
#Associated Variable and Callsites
This variable is associated with another variable named GLumenRadiosityTemporalAccumulation
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenRadiosity.cpp:134
Scope: file
Source code excerpt:
);
int32 GLumenRadiosityTemporalAccumulation = 1;
FAutoConsoleVariableRef CVarLumenRadiosityTemporalAccumulation(
TEXT("r.LumenScene.Radiosity.Temporal"),
GLumenRadiosityTemporalAccumulation,
TEXT("Whether to use temporal super sampling on Radiosity. Increases quality, but also adds latency to the speed that lighting changes propagate, and animated noise in the results."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
int32 GLumenRadiosityTemporalMaxFramesAccumulated = 4;
FAutoConsoleVariableRef CVarLumenRadiosityTemporalMaxFramesAccumulated(
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenRadiosity.cpp:205
Scope (from outer to inner):
file
namespace LumenRadiosity
function bool UseTemporalAccumulation
Source code excerpt:
bool UseTemporalAccumulation()
{
return GLumenRadiosityTemporalAccumulation != 0
&& UE::PixelFormat::HasCapabilities(Lumen::GetIndirectLightingAtlasFormat(), EPixelFormatCapabilities::TypedUAVLoad)
&& UE::PixelFormat::HasCapabilities(Lumen::GetNumFramesAccumulatedAtlasFormat(), EPixelFormatCapabilities::TypedUAVLoad);
}
}
bool LumenRadiosity::IsEnabled(const FSceneViewFamily& ViewFamily)