r.Lumen.ScreenProbeGather.FullResolutionJitterWidth

r.Lumen.ScreenProbeGather.FullResolutionJitterWidth

#Overview

name: r.Lumen.ScreenProbeGather.FullResolutionJitterWidth

The value of this variable can be defined or overridden in .ini config files. 3 .ini config files referencing this setting variable.

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.FullResolutionJitterWidth is to control the size of the full resolution jitter applied to Screen Probe upsampling in Lumen, Unreal Engine 5’s global illumination system. This setting is part of the rendering system, specifically the Lumen lighting technology.

This setting variable is primarily used in the Lumen subsystem of Unreal Engine’s rendering module. It’s referenced in the LumenScreenProbeGather.cpp file, which suggests it’s closely tied to the screen probe gathering process in Lumen.

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

The associated variable GLumenScreenProbeFullResolutionJitterWidth directly interacts with this setting. They share the same value, with GLumenScreenProbeFullResolutionJitterWidth being the C++ variable that stores the actual value used in the code.

Developers should be aware that this variable affects the quality and performance of Lumen’s screen probe upsampling. A width of 1 results in jittering by the DownsampleFactor number of pixels. Adjusting this value can impact both visual quality and performance.

Best practices when using this variable include:

  1. Carefully balancing between visual quality and performance.
  2. Testing different values to find the optimal setting for your specific scene and target hardware.
  3. Considering the impact on different quality settings, as the code suggests the effect may be halved when LumenFinalGatherQuality is 4.0 or higher.

Regarding the associated variable GLumenScreenProbeFullResolutionJitterWidth:

The purpose of GLumenScreenProbeFullResolutionJitterWidth is to store the actual value of the jitter width used in the Lumen screen probe gathering process. It’s a float variable that directly corresponds to the console variable r.Lumen.ScreenProbeGather.FullResolutionJitterWidth.

This variable is used in the Lumen subsystem of the rendering module, specifically in the screen probe gathering process.

The value of GLumenScreenProbeFullResolutionJitterWidth is set by the console variable system when r.Lumen.ScreenProbeGather.FullResolutionJitterWidth is modified.

It interacts directly with the console variable r.Lumen.ScreenProbeGather.FullResolutionJitterWidth, and is used in the GetScreenProbeFullResolutionJitterWidth function to determine the actual jitter width based on the view’s final post-process settings.

Developers should be aware that this variable’s value can be modified at runtime, potentially affecting rendering performance and quality dynamically.

Best practices include:

  1. Avoiding direct modification of GLumenScreenProbeFullResolutionJitterWidth in code, instead using the console variable to ensure consistency.
  2. Considering the interaction with LumenFinalGatherQuality when using this variable in calculations.
  3. Profiling the impact of different values on both visual quality and performance in your specific use case.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseScalability.ini:283, section: [GlobalIlluminationQuality@2]

Location: <Workspace>/Engine/Config/BaseScalability.ini:306, section: [GlobalIlluminationQuality@3]

Location: <Workspace>/Engine/Config/BaseScalability.ini:330, section: [GlobalIlluminationQuality@Cine]

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

Scope: file

Source code excerpt:

float GLumenScreenProbeFullResolutionJitterWidth = 1;
FAutoConsoleVariableRef GVarLumenScreenProbeFullResolutionJitterWidth(
	TEXT("r.Lumen.ScreenProbeGather.FullResolutionJitterWidth"),
	GLumenScreenProbeFullResolutionJitterWidth,
	TEXT("Size of the full resolution jitter applied to Screen Probe upsampling, as a fraction of a screen tile.  A width of 1 results in jittering by DownsampleFactor number of pixels."),
	ECVF_Scalability | ECVF_RenderThreadSafe
);

int32 GLumenScreenProbeIntegrationTileClassification = 1;

#Associated Variable and Callsites

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

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

Scope: file

Source code excerpt:

);

float GLumenScreenProbeFullResolutionJitterWidth = 1;
FAutoConsoleVariableRef GVarLumenScreenProbeFullResolutionJitterWidth(
	TEXT("r.Lumen.ScreenProbeGather.FullResolutionJitterWidth"),
	GLumenScreenProbeFullResolutionJitterWidth,
	TEXT("Size of the full resolution jitter applied to Screen Probe upsampling, as a fraction of a screen tile.  A width of 1 results in jittering by DownsampleFactor number of pixels."),
	ECVF_Scalability | ECVF_RenderThreadSafe
);

int32 GLumenScreenProbeIntegrationTileClassification = 1;
FAutoConsoleVariableRef CVarLumenScreenProbeIntegrationTileClassification(

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

Scope (from outer to inner):

file
namespace    LumenScreenProbeGather
function     float GetScreenProbeFullResolutionJitterWidth

Source code excerpt:

	float GetScreenProbeFullResolutionJitterWidth(const FViewInfo& View)
	{
		return GLumenScreenProbeFullResolutionJitterWidth * (View.FinalPostProcessSettings.LumenFinalGatherQuality >= 4.0f ? .5f : 1.0f);
	}

	bool UseRejectBasedOnNormal()
	{
		return GLumenScreenProbeGather != 0
			&& CVarLumenScreenProbeTemporalRejectBasedOnNormal.GetValueOnRenderThread() != 0;