r.Lumen.ScreenProbeGather.RadianceCache.ClipmapWorldExtent
r.Lumen.ScreenProbeGather.RadianceCache.ClipmapWorldExtent
#Overview
name: r.Lumen.ScreenProbeGather.RadianceCache.ClipmapWorldExtent
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
World space extent of the first clipmap
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Lumen.ScreenProbeGather.RadianceCache.ClipmapWorldExtent is to define the world space extent of the first clipmap in Unreal Engine 5’s Lumen global illumination system, specifically for the Radiance Cache used in screen probe gathering.
This setting variable is primarily used in the Lumen subsystem of Unreal Engine 5’s rendering module. It’s part of the screen probe gathering process, which is a crucial component of Lumen’s global illumination solution.
The value of this variable is set through the Unreal Engine console variable system. It’s initialized with a default value of 2500.0f and can be modified at runtime using console commands.
This variable interacts closely with GLumenRadianceCacheClipmapWorldExtent, which is the associated C++ variable that directly holds the value set by the console variable. They share the same value, with the console variable acting as an interface for runtime modification.
Developers should be aware that this variable affects the extent of the first clipmap in world space units. Changing this value will impact the coverage and potentially the performance of the Radiance Cache used in Lumen’s screen probe gathering process.
Best practices when using this variable include:
- Carefully consider the scale of your scene when adjusting this value.
- Monitor performance impacts when modifying this value, as larger extents may increase computational cost.
- Use in conjunction with other Lumen settings for optimal results.
- Test changes thoroughly in various lighting conditions and scene complexities.
Regarding the associated variable GLumenRadianceCacheClipmapWorldExtent:
This is the C++ variable that directly holds the value set by the console variable. It’s used within the Lumen system to actually apply the clipmap world extent setting.
The variable is used in the SetupRadianceCacheInputs function within the LumenScreenProbeGatherRadianceCache namespace. This function sets up the inputs for the Radiance Cache, including the clipmap world extent.
Developers should note that while they can’t directly modify GLumenRadianceCacheClipmapWorldExtent in code, changes to the console variable r.Lumen.ScreenProbeGather.RadianceCache.ClipmapWorldExtent will be reflected in this variable.
When working with this variable, it’s important to consider its impact on the entire Radiance Cache setup, as it’s used alongside other parameters like clipmap distribution base and probe atlas resolution to configure the Radiance Cache system.
#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:431
Scope: file
Source code excerpt:
float GLumenRadianceCacheClipmapWorldExtent = 2500.0f;
FAutoConsoleVariableRef CVarLumenRadianceCacheClipmapWorldExtent(
TEXT("r.Lumen.ScreenProbeGather.RadianceCache.ClipmapWorldExtent"),
GLumenRadianceCacheClipmapWorldExtent,
TEXT("World space extent of the first clipmap"),
ECVF_RenderThreadSafe
);
float GLumenRadianceCacheClipmapDistributionBase = 2.0f;
#Associated Variable and Callsites
This variable is associated with another variable named GLumenRadianceCacheClipmapWorldExtent
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:429
Scope: file
Source code excerpt:
);
float GLumenRadianceCacheClipmapWorldExtent = 2500.0f;
FAutoConsoleVariableRef CVarLumenRadianceCacheClipmapWorldExtent(
TEXT("r.Lumen.ScreenProbeGather.RadianceCache.ClipmapWorldExtent"),
GLumenRadianceCacheClipmapWorldExtent,
TEXT("World space extent of the first clipmap"),
ECVF_RenderThreadSafe
);
float GLumenRadianceCacheClipmapDistributionBase = 2.0f;
FAutoConsoleVariableRef CVarLumenRadianceCacheClipmapDistributionBase(
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:548
Scope (from outer to inner):
file
namespace LumenScreenProbeGatherRadianceCache
function LumenRadianceCache::FRadianceCacheInputs SetupRadianceCacheInputs
Source code excerpt:
LumenRadianceCache::FRadianceCacheInputs Parameters = LumenRadianceCache::GetDefaultRadianceCacheInputs();
Parameters.ReprojectionRadiusScale = GRadianceCacheReprojectionRadiusScale;
Parameters.ClipmapWorldExtent = GLumenRadianceCacheClipmapWorldExtent;
Parameters.ClipmapDistributionBase = GLumenRadianceCacheClipmapDistributionBase;
Parameters.RadianceProbeClipmapResolution = GetClipmapGridResolution();
Parameters.ProbeAtlasResolutionInProbes = FIntPoint(GRadianceCacheProbeAtlasResolutionInProbes, GRadianceCacheProbeAtlasResolutionInProbes);
Parameters.NumRadianceProbeClipmaps = GetNumClipmaps();
Parameters.RadianceProbeResolution = FMath::Max(GetProbeResolution(), LumenRadianceCache::MinRadianceProbeResolution);
Parameters.FinalProbeResolution = GetFinalProbeResolution();