r.Lumen.RadianceCache.ShowBlackRadianceCacheLighting
r.Lumen.RadianceCache.ShowBlackRadianceCacheLighting
#Overview
name: r.Lumen.RadianceCache.ShowBlackRadianceCacheLighting
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.RadianceCache.ShowBlackRadianceCacheLighting is to control the visualization of radiance cache lighting in the Lumen global illumination system of Unreal Engine 5. It is primarily used for debugging and development purposes within the rendering system.
This setting variable is utilized by the Lumen subsystem, specifically within the Radiance Cache component of Lumen. It is part of the rendering module of Unreal Engine 5.
The value of this variable is set through the Unreal Engine console variable system. It is initialized to 0 and can be modified at runtime using console commands.
The associated variable GRadianceCacheShowBlackRadianceCacheLighting directly interacts with r.Lumen.RadianceCache.ShowBlackRadianceCacheLighting. They share the same value, with the console variable acting as an interface to modify the global variable.
Developers should be aware that this variable is intended for debugging purposes. When enabled (set to a non-zero value), it will cause the radiance cache lighting to be rendered as black, which can be useful for isolating issues related to the radiance cache in the Lumen system.
Best practices for using this variable include:
- Use it temporarily for debugging and development purposes only.
- Ensure it is set back to 0 for normal gameplay and production builds.
- Combine it with other Lumen debugging tools for comprehensive analysis of lighting issues.
Regarding the associated variable GRadianceCacheShowBlackRadianceCacheLighting:
The purpose of GRadianceCacheShowBlackRadianceCacheLighting is to serve as the internal representation of the r.Lumen.RadianceCache.ShowBlackRadianceCacheLighting console variable within the engine’s C++ code.
This variable is used directly in the Lumen Radiance Cache subsystem of the rendering module. It’s accessed in the GetInterpolationParametersNoResources function to set the ShowBlackRadianceCacheLighting parameter for radiance cache interpolation.
The value of this variable is set by the console variable system when r.Lumen.RadianceCache.ShowBlackRadianceCacheLighting is modified.
No other variables directly interact with GRadianceCacheShowBlackRadianceCacheLighting besides the console variable it’s associated with.
Developers should be aware that modifying this variable directly in code is not recommended. Instead, they should use the console variable system to ensure proper synchronization between the console variable and the internal variable.
Best practices for this variable include:
- Treat it as read-only in most code contexts.
- Use the console variable system to modify its value when necessary.
- Be cautious of its performance impact when enabled in performance-critical sections of code.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenRadianceCache.cpp:44
Scope: file
Source code excerpt:
int32 GRadianceCacheShowBlackRadianceCacheLighting = 0;
FAutoConsoleVariableRef CVarRadianceCacheShowBlackRadianceCacheLighting(
TEXT("r.Lumen.RadianceCache.ShowBlackRadianceCacheLighting"),
GRadianceCacheShowBlackRadianceCacheLighting,
TEXT(""),
ECVF_RenderThreadSafe
);
int32 GRadianceCacheFilterProbes = 1;
#Associated Variable and Callsites
This variable is associated with another variable named GRadianceCacheShowBlackRadianceCacheLighting
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenRadianceCache.cpp:42
Scope: file
Source code excerpt:
);
int32 GRadianceCacheShowBlackRadianceCacheLighting = 0;
FAutoConsoleVariableRef CVarRadianceCacheShowBlackRadianceCacheLighting(
TEXT("r.Lumen.RadianceCache.ShowBlackRadianceCacheLighting"),
GRadianceCacheShowBlackRadianceCacheLighting,
TEXT(""),
ECVF_RenderThreadSafe
);
int32 GRadianceCacheFilterProbes = 1;
FAutoConsoleVariableRef CVarRadianceCacheFilterProbes(
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenRadianceCache.cpp:136
Scope (from outer to inner):
file
namespace LumenRadianceCache
function void GetInterpolationParametersNoResources
Source code excerpt:
OutParameters.ProbeWorldOffset = nullptr;
OutParameters.OverrideCacheOcclusionLighting = GRadianceCacheOverrideCacheOcclusionLighting;
OutParameters.ShowBlackRadianceCacheLighting = GRadianceCacheShowBlackRadianceCacheLighting;
OutParameters.ProbeAtlasResolutionModuloMask = (1u << FMath::FloorLog2(RadianceCacheInputs.ProbeAtlasResolutionInProbes.X)) - 1;
OutParameters.ProbeAtlasResolutionDivideShift = FMath::FloorLog2(RadianceCacheInputs.ProbeAtlasResolutionInProbes.X);
for (int32 ClipmapIndex = 0; ClipmapIndex < RadianceCacheState.Clipmaps.Num(); ++ClipmapIndex)
{
const FRadianceCacheClipmap& Clipmap = RadianceCacheState.Clipmaps[ClipmapIndex];