r.BasePassOutputsVelocity
r.BasePassOutputsVelocity
#Overview
name: r.BasePassOutputsVelocity
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Deprecated CVar. Use r.VelocityOutputPass instead.\n
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.BasePassOutputsVelocity is to control velocity output in the base pass of Unreal Engine’s rendering pipeline. However, it’s important to note that this variable is deprecated and developers should use r.VelocityOutputPass instead.
This setting variable is primarily used in the rendering system of Unreal Engine. Based on the details in the Callsites section, it’s referenced in the VelocityRendering.cpp file, which is part of the Renderer module.
The value of this variable is set using a TAutoConsoleVariable, which means it can be changed at runtime through the console. However, it’s marked as ECVF_ReadOnly, indicating that it’s not intended to be modified during normal operation.
The associated variable CVarBasePassOutputsVelocity interacts directly with r.BasePassOutputsVelocity. They share the same value and are essentially the same variable, with one being the console command and the other being the C++ representation.
Developers must be aware that this variable is deprecated. The code includes a warning message that will be logged if the variable is set to any value other than -1. This serves as a reminder to use the newer r.VelocityOutputPass instead.
The best practice when dealing with this variable is to avoid using it altogether. Instead, developers should use the r.VelocityOutputPass variable for controlling velocity output in their rendering pipeline.
Regarding the associated variable CVarBasePassOutputsVelocity:
The purpose of CVarBasePassOutputsVelocity is to provide a C++ interface for the r.BasePassOutputsVelocity console variable. It’s used internally by the engine to check the value of the setting and potentially log warnings about its deprecated status.
This variable is part of the Renderer module and is used in the velocity rendering system. It’s defined as a static TAutoConsoleVariable, which means it’s accessible throughout the VelocityRendering.cpp file.
The value of CVarBasePassOutputsVelocity is set when the r.BasePassOutputsVelocity console variable is set. It’s initialized with a default value of -1.
As with r.BasePassOutputsVelocity, developers should be aware that this variable is deprecated. The ValidateVelocityCVars function checks if this variable is set to anything other than -1 and logs a warning if so.
The best practice for developers is to avoid using CVarBasePassOutputsVelocity in new code. Instead, they should look for the equivalent functionality in the newer velocity output system, likely controlled by a variable related to r.VelocityOutputPass.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VelocityRendering.cpp:37
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarBasePassOutputsVelocity(
TEXT("r.BasePassOutputsVelocity"),
-1,
TEXT("Deprecated CVar. Use r.VelocityOutputPass instead.\n"),
ECVF_ReadOnly | ECVF_RenderThreadSafe);
static TAutoConsoleVariable<int32> CVarVertexDeformationOutputsVelocity(
TEXT("r.VertexDeformationOutputsVelocity"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarBasePassOutputsVelocity
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VelocityRendering.cpp:36
Scope: file
Source code excerpt:
ECVF_ReadOnly | ECVF_RenderThreadSafe);
static TAutoConsoleVariable<int32> CVarBasePassOutputsVelocity(
TEXT("r.BasePassOutputsVelocity"),
-1,
TEXT("Deprecated CVar. Use r.VelocityOutputPass instead.\n"),
ECVF_ReadOnly | ECVF_RenderThreadSafe);
static TAutoConsoleVariable<int32> CVarVertexDeformationOutputsVelocity(
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VelocityRendering.cpp:70
Scope (from outer to inner):
file
function inline void ValidateVelocityCVars
Source code excerpt:
{
{
const int32 Value = CVarBasePassOutputsVelocity.GetValueOnAnyThread();
if (Value != -1)
{
UE_LOG(LogRenderer, Warning, TEXT("Deprecated CVar r.BasePassOutputsVelocity is set to %d. Remove and use r.VelocityOutputPass instead."), Value);
}
}
{