r.Lumen.ScreenProbeGather.TemporalFilterProbes

r.Lumen.ScreenProbeGather.TemporalFilterProbes

#Overview

name: r.Lumen.ScreenProbeGather.TemporalFilterProbes

This variable is created as a Console Variable (cvar).

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of r.Lumen.ScreenProbeGather.TemporalFilterProbes is to control whether temporal filtering is applied to probe traces in the Lumen lighting system to reduce noise. This setting is part of Unreal Engine 5’s advanced rendering features, specifically the Lumen global illumination system.

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 LumenScreenProbeGather component of the engine.

The value of this variable is set through the console variable system in Unreal Engine. It’s defined as an FAutoConsoleVariableRef, which means it can be changed at runtime through console commands or configuration files.

The associated variable GLumenScreenProbeTemporalFilterProbes directly interacts with this console variable. They share the same value, with GLumenScreenProbeTemporalFilterProbes being the actual integer used in the code logic.

Developers must be aware that this variable is a boolean flag (0 or 1) that determines whether temporal filtering is applied to screen probe traces. When enabled, it can help reduce noise in the lighting calculations but may have performance implications.

Best practices when using this variable include:

  1. Testing the visual quality and performance impact with both settings (0 and 1) to determine the best option for your specific use case.
  2. Consider disabling this feature (setting to 0) if you’re targeting lower-end hardware or need to optimize performance.
  3. Be aware that changing this setting may affect the overall visual consistency of your game, so it should be set early in development and maintained throughout.

Regarding the associated variable GLumenScreenProbeTemporalFilterProbes:

The purpose of GLumenScreenProbeTemporalFilterProbes is to serve as the actual integer value used in the code logic to determine if temporal filtering should be applied to screen probe traces.

This variable is used directly in the LumenScreenProbeGather namespace, specifically in the UseProbeTemporalFilter() function. This function checks if the temporal filter should be applied based on the value of GLumenScreenProbeTemporalFilterProbes and another variable GLumenScreenProbeGatherReferenceMode.

The value of this variable is set by the console variable system through r.Lumen.ScreenProbeGather.TemporalFilterProbes.

Developers should be aware that this variable interacts with GLumenScreenProbeGatherReferenceMode. If GLumenScreenProbeGatherReferenceMode is true, temporal filtering will not be used regardless of the value of GLumenScreenProbeTemporalFilterProbes.

Best practices for using this variable include:

  1. Avoid directly modifying GLumenScreenProbeTemporalFilterProbes in code. Instead, use the console variable r.Lumen.ScreenProbeGather.TemporalFilterProbes to change its value.
  2. When debugging or profiling Lumen’s screen probe gathering, check the value of this variable to understand if temporal filtering is being applied.
  3. Consider the interaction with GLumenScreenProbeGatherReferenceMode when analyzing the behavior of screen probe gathering.

#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:248

Scope: file

Source code excerpt:

int32 GLumenScreenProbeTemporalFilterProbes = 0;
FAutoConsoleVariableRef GVarLumenScreenProbeTemporalFilter(
	TEXT("r.Lumen.ScreenProbeGather.TemporalFilterProbes"),
	GLumenScreenProbeTemporalFilterProbes,
	TEXT("Whether to temporally filter probe traces to reduce noise."),
	ECVF_Scalability | ECVF_RenderThreadSafe
);

int32 GLumenShortRangeAmbientOcclusion = 1;

#Associated Variable and Callsites

This variable is associated with another variable named GLumenScreenProbeTemporalFilterProbes. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:246

Scope: file

Source code excerpt:

);

int32 GLumenScreenProbeTemporalFilterProbes = 0;
FAutoConsoleVariableRef GVarLumenScreenProbeTemporalFilter(
	TEXT("r.Lumen.ScreenProbeGather.TemporalFilterProbes"),
	GLumenScreenProbeTemporalFilterProbes,
	TEXT("Whether to temporally filter probe traces to reduce noise."),
	ECVF_Scalability | ECVF_RenderThreadSafe
);

int32 GLumenShortRangeAmbientOcclusion = 1;
FAutoConsoleVariableRef GVarLumenScreenSpaceShortRangeAO(

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:384

Scope (from outer to inner):

file
namespace    LumenScreenProbeGather
function     bool UseProbeTemporalFilter

Source code excerpt:

	bool UseProbeTemporalFilter()
	{
		return GLumenScreenProbeGatherReferenceMode ? false : GLumenScreenProbeTemporalFilterProbes != 0;
	}

	bool UseRadianceCache(const FViewInfo& View)
	{
		return GLumenScreenProbeGatherReferenceMode ? false : GLumenRadianceCache != 0;
	}