r.Lumen.ScreenProbeGather.SpatialFilterProbes
r.Lumen.ScreenProbeGather.SpatialFilterProbes
#Overview
name: r.Lumen.ScreenProbeGather.SpatialFilterProbes
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether to spatially filter probe traces to reduce noise.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Lumen.ScreenProbeGather.SpatialFilterProbes is to control whether spatial filtering is applied to probe traces in the Lumen screen probe gathering process to reduce noise.
This setting variable is primarily used in the Lumen rendering system, which is part of Unreal Engine’s global illumination solution. Specifically, it’s utilized in the screen probe gathering subsystem of Lumen.
The value of this variable is set through the Unreal Engine console or configuration files. It’s defined as an FAutoConsoleVariableRef, which means it can be changed at runtime.
The variable interacts directly with GLumenScreenProbeSpatialFilter, which is the actual int32 variable that stores the setting’s value. They share the same value, with GLumenScreenProbeSpatialFilter being the C++ representation of the console variable.
Developers should be aware that this variable affects the quality and performance of the Lumen global illumination system. Enabling spatial filtering (by setting the value to 1) can reduce noise in the lighting, but may come at a performance cost.
Best practices when using this variable include:
- Testing different values to find the right balance between visual quality and performance for your specific project.
- Considering disabling it in performance-critical scenarios or on lower-end hardware.
- Using it in conjunction with other Lumen settings for optimal results.
Regarding the associated variable GLumenScreenProbeSpatialFilter:
The purpose of GLumenScreenProbeSpatialFilter is to store the actual value of the r.Lumen.ScreenProbeGather.SpatialFilterProbes setting within the C++ code.
This variable is used directly in the Lumen screen probe gathering system, specifically in the LumenScreenProbeGather namespace.
The value of this variable is set by the console variable system when r.Lumen.ScreenProbeGather.SpatialFilterProbes is modified.
It interacts with the UseProbeSpatialFilter() function, which checks if the spatial filter should be applied based on this variable’s value and another reference mode setting.
Developers should be aware that this is the actual variable checked in the rendering code, so any runtime changes to the console variable will be reflected here.
Best practices for using GLumenScreenProbeSpatialFilter include:
- Not modifying it directly in code, but rather using the console variable to change its value.
- Using the UseProbeSpatialFilter() function when determining whether to apply the spatial filter in rendering code.
- Considering its performance implications when enabled, especially in performance-critical sections of the rendering pipeline.
#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:240
Scope: file
Source code excerpt:
int32 GLumenScreenProbeSpatialFilter = 1;
FAutoConsoleVariableRef GVarLumenScreenProbeFilter(
TEXT("r.Lumen.ScreenProbeGather.SpatialFilterProbes"),
GLumenScreenProbeSpatialFilter,
TEXT("Whether to spatially filter probe traces to reduce noise."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
int32 GLumenScreenProbeTemporalFilterProbes = 0;
#Associated Variable and Callsites
This variable is associated with another variable named GLumenScreenProbeSpatialFilter
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:238
Scope: file
Source code excerpt:
);
int32 GLumenScreenProbeSpatialFilter = 1;
FAutoConsoleVariableRef GVarLumenScreenProbeFilter(
TEXT("r.Lumen.ScreenProbeGather.SpatialFilterProbes"),
GLumenScreenProbeSpatialFilter,
TEXT("Whether to spatially filter probe traces to reduce noise."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
int32 GLumenScreenProbeTemporalFilterProbes = 0;
FAutoConsoleVariableRef GVarLumenScreenProbeTemporalFilter(
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:379
Scope (from outer to inner):
file
namespace LumenScreenProbeGather
function bool UseProbeSpatialFilter
Source code excerpt:
bool UseProbeSpatialFilter()
{
return GLumenScreenProbeGatherReferenceMode ? false : GLumenScreenProbeSpatialFilter != 0;
}
bool UseProbeTemporalFilter()
{
return GLumenScreenProbeGatherReferenceMode ? false : GLumenScreenProbeTemporalFilterProbes != 0;
}