r.Lumen.IrradianceFieldGather.NumProbesToTraceBudget
r.Lumen.IrradianceFieldGather.NumProbesToTraceBudget
#Overview
name: r.Lumen.IrradianceFieldGather.NumProbesToTraceBudget
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Number of probes that can be updated in a frame before downsampling.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Lumen.IrradianceFieldGather.NumProbesToTraceBudget is to control the number of probes that can be updated in a frame before downsampling in the Lumen Irradiance Field system. This setting is part of Unreal Engine 5’s Lumen global illumination system, specifically the Irradiance Field component.
This setting variable is primarily used in the Lumen subsystem of Unreal Engine’s rendering module. Based on the callsites, it’s clear that this variable is utilized in the LumenIrradianceFieldGather.cpp file, which is part of the Renderer’s private implementation.
The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 200 and can be modified at runtime using the console command system.
The associated variable GLumenIrradianceFieldNumProbesToTraceBudget directly interacts with this setting. They share the same value, with GLumenIrradianceFieldNumProbesToTraceBudget being the actual variable used in the C++ code to control the behavior.
Developers should be aware that this variable affects performance and quality trade-offs in the Lumen system. A higher number of probes to trace per frame can provide more accurate lighting updates but may impact performance. Conversely, a lower number might improve performance but could result in less responsive or less accurate global illumination.
Best practices when using this variable include:
- Adjusting it based on the specific needs of your scene and target hardware.
- Monitoring performance impacts when modifying this value.
- Considering the balance between lighting update frequency and overall performance.
- Testing different values to find the optimal setting for your specific use case.
Regarding the associated variable GLumenIrradianceFieldNumProbesToTraceBudget:
- Its purpose is to store and provide access to the number of probes that can be updated in a frame.
- It’s used directly in the Lumen Irradiance Field gather process, as seen in the SetupRadianceCacheInputs function.
- Its value is set by the console variable system and can be modified at runtime.
- It interacts directly with the Lumen system’s probe update logic.
- Developers should be aware that modifying this variable will directly affect the Lumen system’s behavior and performance.
- Best practices include using this variable in conjunction with other Lumen settings to achieve the desired balance between lighting quality and 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:47
Scope: file
Source code excerpt:
int32 GLumenIrradianceFieldNumProbesToTraceBudget = 200;
FAutoConsoleVariableRef CVarLumenIrradianceFieldNumProbesToTraceBudget(
TEXT("r.Lumen.IrradianceFieldGather.NumProbesToTraceBudget"),
GLumenIrradianceFieldNumProbesToTraceBudget,
TEXT("Number of probes that can be updated in a frame before downsampling."),
ECVF_RenderThreadSafe
);
int32 GLumenIrradianceFieldGridResolution = 64;
#Associated Variable and Callsites
This variable is associated with another variable named GLumenIrradianceFieldNumProbesToTraceBudget
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenIrradianceFieldGather.cpp:45
Scope: file
Source code excerpt:
);
int32 GLumenIrradianceFieldNumProbesToTraceBudget = 200;
FAutoConsoleVariableRef CVarLumenIrradianceFieldNumProbesToTraceBudget(
TEXT("r.Lumen.IrradianceFieldGather.NumProbesToTraceBudget"),
GLumenIrradianceFieldNumProbesToTraceBudget,
TEXT("Number of probes that can be updated in a frame before downsampling."),
ECVF_RenderThreadSafe
);
int32 GLumenIrradianceFieldGridResolution = 64;
FAutoConsoleVariableRef CVarLumenIrradianceFieldResolution(
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenIrradianceFieldGather.cpp:142
Scope (from outer to inner):
file
namespace LumenIrradianceFieldGather
function LumenRadianceCache::FRadianceCacheInputs SetupRadianceCacheInputs
Source code excerpt:
Parameters.IrradianceProbeResolution = GLumenIrradianceFieldProbeIrradianceResolution;
Parameters.OcclusionProbeResolution = GLumenIrradianceFieldProbeOcclusionResolution;
Parameters.NumProbesToTraceBudget = GLumenIrradianceFieldNumProbesToTraceBudget;
Parameters.RadianceCacheStats = GLumenIrradianceFieldStats;
return Parameters;
}
}
class FMarkRadianceProbesUsedByGBufferCS : public FGlobalShader