r.VT.ForceContinuousUpdate

r.VT.ForceContinuousUpdate

#Overview

name: r.VT.ForceContinuousUpdate

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.VT.ForceContinuousUpdate is to control the update behavior of virtual textures in Unreal Engine 5’s rendering system. Specifically, it forces continuous updates on all virtual textures when enabled.

This setting variable is primarily used by the Virtual Texture System, which is part of Unreal Engine’s rendering subsystem. It’s defined and used in the VirtualTextureSystem.cpp file, indicating its close integration with the virtual texturing functionality.

The value of this variable is set through the console variable system in Unreal Engine. It’s defined as a TAutoConsoleVariable with an initial value of 0, meaning it’s disabled by default. Developers can change this value at runtime using console commands or through code.

The associated variable CVarVTForceContinuousUpdate directly interacts with r.VT.ForceContinuousUpdate. They share the same value and purpose. CVarVTForceContinuousUpdate is used in the FVirtualTextureUpdateSettings constructor to set the bForceContinuousUpdate member variable.

Developers should be aware that enabling this variable (setting it to a non-zero value) will force all virtual textures to update continuously. This can have performance implications, especially in scenarios with many virtual textures or on less powerful hardware.

Best practices for using this variable include:

  1. Keep it disabled (0) by default for optimal performance.
  2. Enable it temporarily for debugging or when continuous updates are necessary for specific use cases.
  3. Monitor performance closely when enabled, as it may impact frame rates.
  4. Use in conjunction with other virtual texture settings for fine-tuned control over the virtual texturing system.

Regarding the associated variable CVarVTForceContinuousUpdate:

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VT/VirtualTextureSystem.cpp:122

Scope: file

Source code excerpt:

);
static TAutoConsoleVariable<int32> CVarVTForceContinuousUpdate(
	TEXT("r.VT.ForceContinuousUpdate"),
	0,
	TEXT("Force continuous update on all virtual textures."),
	ECVF_RenderThreadSafe
);
static TAutoConsoleVariable<int32> CVarVTSyncProduceLockedTiles(
	TEXT("r.VT.SyncProduceLockedTiles"),

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VT/VirtualTextureSystem.cpp:121

Scope: file

Source code excerpt:

	ECVF_RenderThreadSafe
);
static TAutoConsoleVariable<int32> CVarVTForceContinuousUpdate(
	TEXT("r.VT.ForceContinuousUpdate"),
	0,
	TEXT("Force continuous update on all virtual textures."),
	ECVF_RenderThreadSafe
);
static TAutoConsoleVariable<int32> CVarVTSyncProduceLockedTiles(

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VT/VirtualTextureSystem.cpp:169

Scope (from outer to inner):

file
function     FVirtualTextureUpdateSettings::FVirtualTextureUpdateSettings

Source code excerpt:

	bEnableFeedback = CVarVTEnableFeedback.GetValueOnRenderThread() != 0;
	bEnablePlayback = CVarVTEnablePlayback.GetValueOnRenderThread() != 0;
	bForceContinuousUpdate = CVarVTForceContinuousUpdate.GetValueOnRenderThread() != 0;
	bParallelFeedbackTasks = CVarVTParallelFeedbackTasks.GetValueOnRenderThread() != 0;
	NumFeedbackTasks = CVarVTNumFeedbackTasks.GetValueOnRenderThread();
	NumGatherTasks = CVarVTNumGatherTasks.GetValueOnRenderThread();
	MaxGatherPagesBeforeFlush = CVarVTPageUpdateFlushCount.GetValueOnRenderThread();
	MaxRVTPageUploads = VirtualTextureScalability::GetMaxUploadsPerFrame();
	MaxSVTPageUploads = VirtualTextureScalability::GetMaxUploadsPerFrameForStreamingVT();