r.VT.MaxContinuousUpdatesPerFrame
r.VT.MaxContinuousUpdatesPerFrame
#Overview
name: r.VT.MaxContinuousUpdatesPerFrame
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Max number of page uploads for pages that are already mapped.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.VT.MaxContinuousUpdatesPerFrame is to control the maximum number of page uploads for pages that are already mapped in the Virtual Texturing system of Unreal Engine 5. This setting is part of the rendering system, specifically the Virtual Texturing (VT) subsystem.
This setting variable is primarily used within the VirtualTextureScalability namespace, which suggests it’s part of the scalability features for virtual texturing. Based on the details in the Callsites section, this variable is defined and used in the Engine module, specifically in the VirtualTextureScalability.cpp file.
The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 1, but can be changed at runtime through console commands or configuration files.
The associated variable CVarVTMaxContinuousUpdatesPerFrame directly interacts with r.VT.MaxContinuousUpdatesPerFrame. They share the same value and purpose.
Developers must be aware that this variable affects the performance and quality trade-off in the virtual texturing system. A higher value allows more texture updates per frame, potentially improving visual quality but at the cost of performance. A lower value might improve performance but could lead to slower texture streaming.
Best practices when using this variable include:
- Adjusting it based on the target hardware capabilities.
- Considering the trade-off between visual quality and performance.
- Testing different values to find the optimal balance for your specific use case.
- Being cautious about setting very high values, as it could lead to frame rate drops.
Regarding the associated variable CVarVTMaxContinuousUpdatesPerFrame:
The purpose of CVarVTMaxContinuousUpdatesPerFrame is the same as r.VT.MaxContinuousUpdatesPerFrame. It’s the actual console variable that controls the maximum number of continuous updates per frame in the Virtual Texturing system.
This variable is used in the Engine module, specifically within the VirtualTextureScalability namespace.
The value is set when the console variable is created, with a default of 1. It can be modified at runtime through console commands.
CVarVTMaxContinuousUpdatesPerFrame interacts directly with r.VT.MaxContinuousUpdatesPerFrame, as they represent the same setting.
Developers should be aware that this variable has the ECVF_RenderThreadSafe and ECVF_Scalability flags, indicating it’s safe to modify on the render thread and is part of the scalability settings.
Best practices include using the GetValueOnAnyThread() method to safely retrieve the current value, and considering the impact on both editor and runtime performance when modifying this value.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/VT/VirtualTextureScalability.cpp:50
Scope (from outer to inner):
file
namespace VirtualTextureScalability
Source code excerpt:
static TAutoConsoleVariable<int32> CVarVTMaxContinuousUpdatesPerFrame(
TEXT("r.VT.MaxContinuousUpdatesPerFrame"),
1,
TEXT("Max number of page uploads for pages that are already mapped."),
ECVF_RenderThreadSafe | ECVF_Scalability
);
static TAutoConsoleVariable<int32> CVarVTMaxReleasedPerFrame(
#Associated Variable and Callsites
This variable is associated with another variable named CVarVTMaxContinuousUpdatesPerFrame
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/VT/VirtualTextureScalability.cpp:49
Scope (from outer to inner):
file
namespace VirtualTextureScalability
Source code excerpt:
#endif
static TAutoConsoleVariable<int32> CVarVTMaxContinuousUpdatesPerFrame(
TEXT("r.VT.MaxContinuousUpdatesPerFrame"),
1,
TEXT("Max number of page uploads for pages that are already mapped."),
ECVF_RenderThreadSafe | ECVF_Scalability
);
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/VT/VirtualTextureScalability.cpp:190
Scope (from outer to inner):
file
namespace VirtualTextureScalability
function int32 GetMaxContinuousUpdatesPerFrame
Source code excerpt:
#if WITH_EDITOR
// Don't want this scalability setting to affect editor because we rely on reactive updates while editing, like GPULightmass.
return GIsEditor ? CVarVTMaxContinuousUpdatesPerFrameInEditor.GetValueOnAnyThread() : CVarVTMaxContinuousUpdatesPerFrame.GetValueOnAnyThread();
#else
return CVarVTMaxContinuousUpdatesPerFrame.GetValueOnAnyThread();
#endif
}
int32 GetMaxAllocatedVTReleasedPerFrame()
{
#if WITH_EDITOR