r.LumenScene.Radiosity.Temporal.FixedJitterIndex

r.LumenScene.Radiosity.Temporal.FixedJitterIndex

#Overview

name: r.LumenScene.Radiosity.Temporal.FixedJitterIndex

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.LumenScene.Radiosity.Temporal.FixedJitterIndex is to provide a debugging and inspection tool for the Lumen radiosity system in Unreal Engine 5’s rendering pipeline. It allows developers to override the temporal jitter index with a fixed value, which can be useful for examining specific sampling patterns.

This setting variable is primarily used by the Lumen radiosity subsystem, which is part of Unreal Engine 5’s global illumination solution. It’s specifically related to the temporal aspects of radiosity calculations.

The value of this variable is set through the Unreal Engine console or configuration files. It’s implemented as a console variable (CVar) using the FAutoConsoleVariableRef class.

The associated variable GLumenRadiosityFixedJitterIndex interacts directly with r.LumenScene.Radiosity.Temporal.FixedJitterIndex. They share the same value, with GLumenRadiosityFixedJitterIndex being the actual integer variable used in the C++ code.

Developers must be aware that:

  1. This variable is intended for debugging and inspection purposes, not for regular use in production builds.
  2. Setting a fixed jitter index may affect the quality and performance of the radiosity calculations.
  3. The default value is -1, which means the fixed jitter index is not used.

Best practices when using this variable include:

  1. Only use it during development and debugging phases.
  2. Reset it to -1 when not actively debugging to ensure normal temporal jittering behavior.
  3. Document any findings when using specific fixed jitter indices to help with future optimizations.

Regarding the associated variable GLumenRadiosityFixedJitterIndex:

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenRadiosity.cpp:152

Scope: file

Source code excerpt:

int32 GLumenRadiosityFixedJitterIndex = -1;
FAutoConsoleVariableRef CVarLumenRadiosityFixedJitterIndex(
	TEXT("r.LumenScene.Radiosity.Temporal.FixedJitterIndex"),
	GLumenRadiosityFixedJitterIndex,
	TEXT("If zero or greater, overrides the temporal jitter index with a fixed index.  Useful for debugging and inspecting sampling patterns."),
	ECVF_Scalability | ECVF_RenderThreadSafe
);

TAutoConsoleVariable<int32> CVarLumenSceneRadiosityVisualizeProbes(

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenRadiosity.cpp:150

Scope: file

Source code excerpt:

	);

int32 GLumenRadiosityFixedJitterIndex = -1;
FAutoConsoleVariableRef CVarLumenRadiosityFixedJitterIndex(
	TEXT("r.LumenScene.Radiosity.Temporal.FixedJitterIndex"),
	GLumenRadiosityFixedJitterIndex,
	TEXT("If zero or greater, overrides the temporal jitter index with a fixed index.  Useful for debugging and inspecting sampling patterns."),
	ECVF_Scalability | ECVF_RenderThreadSafe
);

TAutoConsoleVariable<int32> CVarLumenSceneRadiosityVisualizeProbes(
	TEXT("r.LumenScene.Radiosity.VisualizeProbes"),

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenRadiosity.cpp:679

Scope: file

Source code excerpt:

		RadiosityTexelTraceParameters.NumTracesPerProbe = RadiosityFrameTemporaries.HemisphereProbeResolution * RadiosityFrameTemporaries.HemisphereProbeResolution;
		RadiosityTexelTraceParameters.ProbeOcclusionStrength = RadiosityFrameTemporaries.bUseProbeOcclusion ? FMath::Clamp<float>(GRadiosityFilteringProbeOcclusionStrength, 0.0f, 1.0f) : 0;
		RadiosityTexelTraceParameters.FixedJitterIndex = GLumenRadiosityFixedJitterIndex;
		RadiosityTexelTraceParameters.MaxFramesAccumulated = LumenRadiosity::UseTemporalAccumulation() ? GLumenRadiosityTemporalMaxFramesAccumulated : 1;
		RadiosityTexelTraceParameters.NumViews = Views.Num();
		// Needs to be set to valid value inside view loop
		RadiosityTexelTraceParameters.ViewIndex = Views.Num();
		RadiosityTexelTraceParameters.MaxCardTiles = MaxCardTiles;