r.LumenScene.Radiosity.Temporal.FixedJitterIndex
r.LumenScene.Radiosity.Temporal.FixedJitterIndex
#Overview
name: r.LumenScene.Radiosity.Temporal.FixedJitterIndex
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
If zero or greater, overrides the temporal jitter index with a fixed index. Useful for debugging and inspecting sampling patterns.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.LumenScene.Radiosity.Temporal.FixedJitterIndex is to provide a debugging and inspection tool for the Lumen radiosity system in Unreal Engine 5’s rendering pipeline. It allows developers to override the temporal jitter index with a fixed value, which can be useful for examining specific sampling patterns.
This setting variable is primarily used by the Lumen radiosity subsystem, which is part of Unreal Engine 5’s global illumination solution. It’s specifically related to the temporal aspects of radiosity calculations.
The value of this variable is set through the Unreal Engine console or configuration files. It’s implemented as a console variable (CVar) using the FAutoConsoleVariableRef class.
The associated variable GLumenRadiosityFixedJitterIndex interacts directly with r.LumenScene.Radiosity.Temporal.FixedJitterIndex. They share the same value, with GLumenRadiosityFixedJitterIndex being the actual integer variable used in the C++ code.
Developers must be aware that:
- This variable is intended for debugging and inspection purposes, not for regular use in production builds.
- Setting a fixed jitter index may affect the quality and performance of the radiosity calculations.
- The default value is -1, which means the fixed jitter index is not used.
Best practices when using this variable include:
- Only use it during development and debugging phases.
- Reset it to -1 when not actively debugging to ensure normal temporal jittering behavior.
- Document any findings when using specific fixed jitter indices to help with future optimizations.
Regarding the associated variable GLumenRadiosityFixedJitterIndex:
- Its purpose is to store the actual value of the fixed jitter index within the C++ code.
- It’s used directly in the Lumen radiosity calculations, specifically in setting up the RadiosityTexelTraceParameters.
- The value is set by the console variable r.LumenScene.Radiosity.Temporal.FixedJitterIndex.
- It interacts with other radiosity calculation parameters, such as MaxFramesAccumulated and NumViews.
- Developers should be aware that modifying this variable directly in code is not recommended; instead, they should use the console variable for changes.
- Best practice is to treat this variable as read-only in most scenarios, letting the console variable system manage its value.
#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:152
Scope: file
Source code excerpt:
int32 GLumenRadiosityFixedJitterIndex = -1;
FAutoConsoleVariableRef CVarLumenRadiosityFixedJitterIndex(
TEXT("r.LumenScene.Radiosity.Temporal.FixedJitterIndex"),
GLumenRadiosityFixedJitterIndex,
TEXT("If zero or greater, overrides the temporal jitter index with a fixed index. Useful for debugging and inspecting sampling patterns."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
TAutoConsoleVariable<int32> CVarLumenSceneRadiosityVisualizeProbes(
#Associated Variable and Callsites
This variable is associated with another variable named GLumenRadiosityFixedJitterIndex
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenRadiosity.cpp:150
Scope: file
Source code excerpt:
);
int32 GLumenRadiosityFixedJitterIndex = -1;
FAutoConsoleVariableRef CVarLumenRadiosityFixedJitterIndex(
TEXT("r.LumenScene.Radiosity.Temporal.FixedJitterIndex"),
GLumenRadiosityFixedJitterIndex,
TEXT("If zero or greater, overrides the temporal jitter index with a fixed index. Useful for debugging and inspecting sampling patterns."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
TAutoConsoleVariable<int32> CVarLumenSceneRadiosityVisualizeProbes(
TEXT("r.LumenScene.Radiosity.VisualizeProbes"),
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenRadiosity.cpp:679
Scope: file
Source code excerpt:
RadiosityTexelTraceParameters.NumTracesPerProbe = RadiosityFrameTemporaries.HemisphereProbeResolution * RadiosityFrameTemporaries.HemisphereProbeResolution;
RadiosityTexelTraceParameters.ProbeOcclusionStrength = RadiosityFrameTemporaries.bUseProbeOcclusion ? FMath::Clamp<float>(GRadiosityFilteringProbeOcclusionStrength, 0.0f, 1.0f) : 0;
RadiosityTexelTraceParameters.FixedJitterIndex = GLumenRadiosityFixedJitterIndex;
RadiosityTexelTraceParameters.MaxFramesAccumulated = LumenRadiosity::UseTemporalAccumulation() ? GLumenRadiosityTemporalMaxFramesAccumulated : 1;
RadiosityTexelTraceParameters.NumViews = Views.Num();
// Needs to be set to valid value inside view loop
RadiosityTexelTraceParameters.ViewIndex = Views.Num();
RadiosityTexelTraceParameters.MaxCardTiles = MaxCardTiles;