r.Lumen.ScreenProbeGather.RadianceCache.Stats
r.Lumen.ScreenProbeGather.RadianceCache.Stats
#Overview
name: r.Lumen.ScreenProbeGather.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.ScreenProbeGather.RadianceCache.Stats is to control the display of GPU statistics for the Radiance Cache update in Lumen’s Screen Probe Gather system. This setting variable is part of Unreal Engine 5’s rendering system, specifically the Lumen global illumination solution.
This setting variable is used in the Lumen module of Unreal Engine’s rendering system. Based on the callsites, it’s primarily utilized in the LumenScreenProbeGather.cpp file, which is part of the Renderer module.
The value of this variable is set through the Unreal Engine console variable system. It’s defined as an FAutoConsoleVariableRef, which means it can be modified at runtime through console commands or configuration files.
The associated variable GRadianceCacheStats interacts directly with this console variable. They share the same value, with GRadianceCacheStats being the actual integer variable used in the code to control the behavior.
Developers should be aware that enabling this variable will cause the GPU to print out Radiance Cache update statistics. This can be useful for performance monitoring and debugging, but may have a small performance impact when enabled.
Best practices for using this variable include:
- Use it primarily for debugging and performance analysis purposes.
- Disable it in shipping builds to avoid any potential performance overhead.
- Be cautious when enabling it in performance-critical scenarios, as printing statistics may affect frame rates.
Regarding the associated variable GRadianceCacheStats:
The purpose of GRadianceCacheStats is to serve as the actual integer flag that controls whether Radiance Cache update statistics are printed by the GPU.
This variable is used within the LumenScreenProbeGatherRadianceCache namespace, specifically in the SetupRadianceCacheInputs function. It’s part of the parameters passed to the Radiance Cache system.
The value of GRadianceCacheStats is set by the r.Lumen.ScreenProbeGather.RadianceCache.Stats console variable.
Developers should be aware that this variable directly controls the behavior of the statistics printing. When it’s non-zero, statistics will be printed.
Best practices for using GRadianceCacheStats include:
- Avoid modifying it directly in code; instead, use the console variable to change its value.
- Consider the performance implications when enabling statistics printing in production environments.
- Use it in conjunction with other Lumen debugging tools for comprehensive performance analysis.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:495
Scope: file
Source code excerpt:
int32 GRadianceCacheStats = 0;
FAutoConsoleVariableRef CVarRadianceCacheStats(
TEXT("r.Lumen.ScreenProbeGather.RadianceCache.Stats"),
GRadianceCacheStats,
TEXT("GPU print out Radiance Cache update stats."),
ECVF_RenderThreadSafe
);
namespace LumenScreenProbeGatherRadianceCache
#Associated Variable and Callsites
This variable is associated with another variable named GRadianceCacheStats
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:493
Scope: file
Source code excerpt:
);
int32 GRadianceCacheStats = 0;
FAutoConsoleVariableRef CVarRadianceCacheStats(
TEXT("r.Lumen.ScreenProbeGather.RadianceCache.Stats"),
GRadianceCacheStats,
TEXT("GPU print out Radiance Cache update stats."),
ECVF_RenderThreadSafe
);
namespace LumenScreenProbeGatherRadianceCache
{
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:559
Scope (from outer to inner):
file
namespace LumenScreenProbeGatherRadianceCache
function LumenRadianceCache::FRadianceCacheInputs SetupRadianceCacheInputs
Source code excerpt:
const float EditingBudgetScale = View.Family->bCurrentlyBeingEdited ? 10.0f : 1.0f;
Parameters.NumProbesToTraceBudget = FMath::RoundToInt(GRadianceCacheNumProbesToTraceBudget * LightingUpdateSpeed * EditingBudgetScale);
Parameters.RadianceCacheStats = GRadianceCacheStats;
return Parameters;
}
};
class FScreenProbeDownsampleDepthUniformCS : public FGlobalShader
{