r.Lumen.IrradianceFieldGather.RadianceCache.Stats
r.Lumen.IrradianceFieldGather.RadianceCache.Stats
#Overview
name: r.Lumen.IrradianceFieldGather.RadianceCache.Stats
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
GPU print out Radiance Cache update stats.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Lumen.IrradianceFieldGather.RadianceCache.Stats is to control whether GPU statistics for the Radiance Cache update in Lumen’s Irradiance Field gathering process are printed out.
-
This setting variable is part of the Lumen rendering system in Unreal Engine 5, specifically for the Irradiance Field gathering process.
-
The Lumen subsystem within the Renderer module relies on this setting variable, as evidenced by its location in the LumenIrradianceFieldGather.cpp file.
-
The value of this variable is set through the Unreal Engine console variable system, as indicated by the FAutoConsoleVariableRef declaration.
-
This variable interacts directly with the GLumenIrradianceFieldStats variable, which is an integer used to store the actual value of the setting.
-
Developers must be aware that enabling this variable will cause additional GPU statistics to be printed, which may impact performance if left enabled in a shipping build.
-
Best practices when using this variable include:
- Using it primarily for debugging and performance analysis during development.
- Ensuring it’s disabled in shipping builds to avoid unnecessary overhead.
- Correlating the stats output with other Lumen settings to optimize rendering performance.
Regarding the associated variable GLumenIrradianceFieldStats:
-
The purpose of GLumenIrradianceFieldStats is to store the actual integer value that determines whether Radiance Cache update stats should be printed.
-
It is used within the LumenIrradianceFieldGather namespace, specifically in the SetupRadianceCacheInputs function.
-
The value is set by the console variable system and is read when setting up the Radiance Cache inputs.
-
This variable directly interacts with the r.Lumen.IrradianceFieldGather.RadianceCache.Stats console variable.
-
Developers should be aware that this variable is used to pass the stats printing flag to the GPU shader code.
-
Best practices for this variable include:
- Not modifying it directly in code, but rather using the console variable to change its value.
- Checking its value when debugging Lumen Irradiance Field gathering performance issues.
- Understanding that a non-zero value will enable stats printing, which may affect performance.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenIrradianceFieldGather.cpp:119
Scope: file
Source code excerpt:
int32 GLumenIrradianceFieldStats = 0;
FAutoConsoleVariableRef CVarLumenIrradianceFieldStats(
TEXT("r.Lumen.IrradianceFieldGather.RadianceCache.Stats"),
GLumenIrradianceFieldStats,
TEXT("GPU print out Radiance Cache update stats."),
ECVF_RenderThreadSafe
);
namespace LumenIrradianceFieldGather
#Associated Variable and Callsites
This variable is associated with another variable named GLumenIrradianceFieldStats
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenIrradianceFieldGather.cpp:117
Scope: file
Source code excerpt:
);
int32 GLumenIrradianceFieldStats = 0;
FAutoConsoleVariableRef CVarLumenIrradianceFieldStats(
TEXT("r.Lumen.IrradianceFieldGather.RadianceCache.Stats"),
GLumenIrradianceFieldStats,
TEXT("GPU print out Radiance Cache update stats."),
ECVF_RenderThreadSafe
);
namespace LumenIrradianceFieldGather
{
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenIrradianceFieldGather.cpp:143
Scope (from outer to inner):
file
namespace LumenIrradianceFieldGather
function LumenRadianceCache::FRadianceCacheInputs SetupRadianceCacheInputs
Source code excerpt:
Parameters.OcclusionProbeResolution = GLumenIrradianceFieldProbeOcclusionResolution;
Parameters.NumProbesToTraceBudget = GLumenIrradianceFieldNumProbesToTraceBudget;
Parameters.RadianceCacheStats = GLumenIrradianceFieldStats;
return Parameters;
}
}
class FMarkRadianceProbesUsedByGBufferCS : public FGlobalShader
{