r.Lumen.ScreenProbeGather.Temporal.DebugForceTracesMoving
r.Lumen.ScreenProbeGather.Temporal.DebugForceTracesMoving
#Overview
name: r.Lumen.ScreenProbeGather.Temporal.DebugForceTracesMoving
This variable is created as a Console Variable (cvar).
- type:
Var
- help: ``
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Lumen.ScreenProbeGather.Temporal.DebugForceTracesMoving is to serve as a debug tool for the Lumen lighting system in Unreal Engine 5, specifically for the screen probe gathering process in the temporal filtering stage.
This setting variable is primarily used in the rendering system, particularly within the Lumen global illumination subsystem. Based on the callsites, it’s clear that this variable is utilized in the LumenScreenProbeFiltering module of the Renderer.
The value of this variable is set through the Unreal Engine console variable system, as indicated by the FAutoConsoleVariableRef declaration. It’s initialized to 0 by default.
This variable interacts directly with its associated variable GLumenScreenProbeTemporalDebugForceTracesMoving. They share the same value, with the console variable acting as an interface for runtime modification.
Developers should be aware that this is a debug-only variable, as indicated by the “Debug” in its name. It’s designed to force all screen probe traces to be considered as moving, which can be useful for testing and debugging temporal aspects of the screen probe gathering process.
Best practices when using this variable include:
- Only enable it for debugging purposes, not in production builds.
- Use it in conjunction with other Lumen debugging tools for comprehensive analysis.
- Remember to disable it after debugging to avoid performance impacts.
Regarding the associated variable GLumenScreenProbeTemporalDebugForceTracesMoving:
The purpose of this variable is to store the actual value set by the console variable in the C++ code.
It’s used directly in the FilterScreenProbes function within the Lumen screen probe filtering process. When set to a non-zero value, it forces all screen probe traces to be considered as moving.
The value is set by the console variable system and can be modified at runtime.
It interacts with the DebugForceTracesMoving parameter in the screen probe calculation shader, converting the int32 value to a float (1.0f if non-zero, 0.0f if zero).
Developers should be aware that this variable directly affects the behavior of the screen probe filtering process when enabled.
Best practices include:
- Use it only for debugging and testing purposes.
- Be cautious when modifying its value, as it can significantly alter the behavior of the Lumen lighting system.
- Always reset it to 0 after debugging to ensure normal functionality in production environments.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeFiltering.cpp:80
Scope: file
Source code excerpt:
int32 GLumenScreenProbeTemporalDebugForceTracesMoving = 0;
FAutoConsoleVariableRef CVarLumenScreenProbeTemporalForceTracesMoving(
TEXT("r.Lumen.ScreenProbeGather.Temporal.DebugForceTracesMoving"),
GLumenScreenProbeTemporalDebugForceTracesMoving,
TEXT(""),
ECVF_RenderThreadSafe
);
int32 GLumenScreenProbeFilteringWaveOps = 1;
#Associated Variable and Callsites
This variable is associated with another variable named GLumenScreenProbeTemporalDebugForceTracesMoving
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeFiltering.cpp:78
Scope: file
Source code excerpt:
);
int32 GLumenScreenProbeTemporalDebugForceTracesMoving = 0;
FAutoConsoleVariableRef CVarLumenScreenProbeTemporalForceTracesMoving(
TEXT("r.Lumen.ScreenProbeGather.Temporal.DebugForceTracesMoving"),
GLumenScreenProbeTemporalDebugForceTracesMoving,
TEXT(""),
ECVF_RenderThreadSafe
);
int32 GLumenScreenProbeFilteringWaveOps = 1;
FAutoConsoleVariableRef CVarLumenScreenProbeFilteringWaveOps(
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeFiltering.cpp:470
Scope (from outer to inner):
file
function void FilterScreenProbes
Source code excerpt:
PassParameters->RWScreenProbeMoving = GraphBuilder.CreateUAV(FRDGTextureUAVDesc(ScreenProbeMoving));
PassParameters->ScreenProbeTraceMoving = ScreenProbeTraceMoving;
PassParameters->DebugForceTracesMoving = GLumenScreenProbeTemporalDebugForceTracesMoving != 0 ? 1.0f : 0.0f;
PassParameters->View = View.ViewUniformBuffer;
PassParameters->ScreenProbeParameters = ScreenProbeParameters;
FScreenProbeCalculateMovingCS::FPermutationDomain PermutationVector;
PermutationVector.Set< FScreenProbeCalculateMovingCS::FThreadGroupSize >(CalculateMovingThreadGroupSize);
auto ComputeShader = View.ShaderMap->GetShader<FScreenProbeCalculateMovingCS>(PermutationVector);