r.Lumen.ScreenProbeGather.Filtering.WaveOps
r.Lumen.ScreenProbeGather.Filtering.WaveOps
#Overview
name: r.Lumen.ScreenProbeGather.Filtering.WaveOps
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether to use Wave Ops path for screen probe filtering.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Lumen.ScreenProbeGather.Filtering.WaveOps is to control whether Wave Operations are used for screen probe filtering in the Lumen global illumination system of Unreal Engine 5. This setting is part of the rendering system, specifically the Lumen lighting subsystem.
This setting variable is used in the Renderer module of Unreal Engine 5, particularly in the Lumen screen probe filtering process. Based on the callsites, it’s clear that this variable is utilized in the LumenScreenProbeFiltering.cpp file, which is part of the Lumen global illumination system.
The value of this variable is set using an FAutoConsoleVariableRef, which means it can be adjusted at runtime through console commands. By default, it is set to 1, enabling the use of Wave Operations for screen probe filtering.
The associated variable GLumenScreenProbeFilteringWaveOps interacts directly with this setting. It’s an int32 variable that holds the actual value used in the code logic.
Developers must be aware that this setting is only effective when the hardware and rendering platform support Wave Operations. The code checks for GRHISupportsWaveOperations and RHISupportsWaveOperations() before applying this setting.
Best practices when using this variable include:
- Ensuring that the target hardware supports Wave Operations before enabling this feature.
- Testing performance with and without Wave Operations enabled, as the optimal setting may vary depending on the specific scene and hardware.
- Being cautious when changing this setting at runtime, as it may impact rendering performance and quality.
Regarding the associated variable GLumenScreenProbeFilteringWaveOps:
The purpose of GLumenScreenProbeFilteringWaveOps is to store the actual value of the r.Lumen.ScreenProbeGather.Filtering.WaveOps setting within the C++ code.
This variable is used directly in the rendering code to determine whether to use the Wave Operations path for screen probe filtering. It’s checked in the FilterScreenProbes function to decide on the filtering method.
The value of GLumenScreenProbeFilteringWaveOps is set by the FAutoConsoleVariableRef, which links it to the r.Lumen.ScreenProbeGather.Filtering.WaveOps console variable.
This variable interacts with other rendering-related variables and functions, particularly those involved in Wave Operations and screen probe filtering.
Developers should be aware that changing GLumenScreenProbeFilteringWaveOps directly in the code is not recommended, as it’s meant to be controlled via the console variable.
Best practices include using the console variable to modify this setting rather than changing the GLumenScreenProbeFilteringWaveOps variable directly, and ensuring that any code that relies on this variable checks for Wave Operations support before using it.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeFiltering.cpp:88
Scope: file
Source code excerpt:
int32 GLumenScreenProbeFilteringWaveOps = 1;
FAutoConsoleVariableRef CVarLumenScreenProbeFilteringWaveOps(
TEXT("r.Lumen.ScreenProbeGather.Filtering.WaveOps"),
GLumenScreenProbeFilteringWaveOps,
TEXT("Whether to use Wave Ops path for screen probe filtering."),
ECVF_RenderThreadSafe
);
class FScreenProbeCompositeTracesWithScatterCS : public FGlobalShader
#Associated Variable and Callsites
This variable is associated with another variable named GLumenScreenProbeFilteringWaveOps
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeFiltering.cpp:86
Scope: file
Source code excerpt:
);
int32 GLumenScreenProbeFilteringWaveOps = 1;
FAutoConsoleVariableRef CVarLumenScreenProbeFilteringWaveOps(
TEXT("r.Lumen.ScreenProbeGather.Filtering.WaveOps"),
GLumenScreenProbeFilteringWaveOps,
TEXT("Whether to use Wave Ops path for screen probe filtering."),
ECVF_RenderThreadSafe
);
class FScreenProbeCompositeTracesWithScatterCS : public FGlobalShader
{
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeFiltering.cpp:650
Scope (from outer to inner):
file
function void FilterScreenProbes
Source code excerpt:
int32 WaveOpWaveSize = 0;
if (GLumenScreenProbeFilteringWaveOps != 0
&& GRHISupportsWaveOperations
&& RHISupportsWaveOperations(View.GetShaderPlatform())
&& ConvertToSHThreadGroupSize * ConvertToSHThreadGroupSize <= 64)
{
// 64 wave size is preferred for FScreenProbeConvertToIrradianceCS
if (GRHIMinimumWaveSize <= 64 && GRHIMaximumWaveSize >= 64)