r.Test.FreezeTemporalHistories.Progress

r.Test.FreezeTemporalHistories.Progress

#Overview

name: r.Test.FreezeTemporalHistories.Progress

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.Test.FreezeTemporalHistories.Progress is to control the progression of temporal histories by one frame when modified for testing purposes in the rendering system of Unreal Engine 5.

This setting variable is primarily used in the rendering subsystem of Unreal Engine 5. It is referenced in the SceneVisibility.cpp file, which is part of the Renderer module.

The value of this variable is set through a console variable (CVar) system. It is initialized with a default value of 0 and can be modified at runtime.

The associated variable CVarFreezeTemporalHistoriesProgress interacts directly with r.Test.FreezeTemporalHistories.Progress. They share the same value and are used interchangeably in the code.

Developers must be aware that this variable is intended for testing purposes and affects the temporal history progression in the rendering pipeline. It should be used cautiously as it can impact the visual quality and performance of temporal effects.

Best practices when using this variable include:

  1. Use it only for debugging and testing purposes.
  2. Reset it to its default value (0) after testing to ensure normal rendering behavior.
  3. Be aware of its impact on temporal effects when modifying its value.

Regarding the associated variable CVarFreezeTemporalHistoriesProgress:

The purpose of CVarFreezeTemporalHistoriesProgress is to provide a programmatic interface to control the r.Test.FreezeTemporalHistories.Progress setting.

It is used in the same rendering subsystem and Renderer module as r.Test.FreezeTemporalHistories.Progress.

The value of CVarFreezeTemporalHistoriesProgress is set through the CVar system and can be accessed using the GetValueOnRenderThread() method.

This variable interacts with a local static variable CurrentFreezeTemporalHistoriesProgress to detect changes and trigger the unfreezing of temporal histories when modified.

Developers should be aware that modifying CVarFreezeTemporalHistoriesProgress will directly affect the behavior of temporal history progression in the rendering pipeline.

Best practices for using CVarFreezeTemporalHistoriesProgress include:

  1. Access its value using GetValueOnRenderThread() to ensure thread-safe operations.
  2. Use it in conjunction with other related variables like CVarFreezeTemporalSequences for comprehensive control over temporal effects in testing scenarios.
  3. Remember to reset or disable any modifications made for testing purposes before shipping the game.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneVisibility.cpp:361

Scope: file

Source code excerpt:


static TAutoConsoleVariable<float> CVarFreezeTemporalHistoriesProgress(
	TEXT("r.Test.FreezeTemporalHistories.Progress"), 0,
	TEXT("Progress the temporal histories by one frame when modified."),
	ECVF_RenderThreadSafe);

#endif

DECLARE_CYCLE_STAT(TEXT("Occlusion Readback"), STAT_CLMM_OcclusionReadback, STATGROUP_CommandListMarkers);

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneVisibility.cpp:360

Scope: file

Source code excerpt:

	ECVF_RenderThreadSafe);

static TAutoConsoleVariable<float> CVarFreezeTemporalHistoriesProgress(
	TEXT("r.Test.FreezeTemporalHistories.Progress"), 0,
	TEXT("Progress the temporal histories by one frame when modified."),
	ECVF_RenderThreadSafe);

#endif

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneVisibility.cpp:4734

Scope (from outer to inner):

file
function     void FSceneRenderer::PrepareViewStateForVisibility

Source code excerpt:


	static int32 CurrentFreezeTemporalHistoriesProgress = 0;
	if (CurrentFreezeTemporalHistoriesProgress != CVarFreezeTemporalHistoriesProgress.GetValueOnRenderThread())
	{
		bFreezeTemporalHistories = false;
		CurrentFreezeTemporalHistoriesProgress = CVarFreezeTemporalHistoriesProgress.GetValueOnRenderThread();
	}

	bool bFreezeTemporalSequences = bFreezeTemporalHistories || CVarFreezeTemporalSequences.GetValueOnRenderThread() != 0;
#endif

	// Load this field once so it has a consistent value for all views (and to avoid the atomic load in the loop).