r.VertexDeformationOutputsVelocity
r.VertexDeformationOutputsVelocity
#Overview
name: r.VertexDeformationOutputsVelocity
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Deprecated CVar. Use r.Velocity.EnableVertexDeformation instead.\n
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.VertexDeformationOutputsVelocity is to control whether vertex deformation outputs velocity in the rendering system. However, it’s important to note that this variable is deprecated, and developers should use r.Velocity.EnableVertexDeformation instead.
This setting variable is primarily used in the Renderer module of Unreal Engine, specifically in the velocity rendering subsystem. This can be seen from the file location “Engine/Source/Runtime/Renderer/Private/VelocityRendering.cpp”.
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 -1.
The associated variable CVarVertexDeformationOutputsVelocity interacts directly with r.VertexDeformationOutputsVelocity. They share the same value and are essentially the same variable, with CVarVertexDeformationOutputsVelocity being the C++ representation of the console variable.
Developers must be aware that this variable is deprecated. Using it will result in a warning message being logged, as seen in the ValidateVelocityCVars function.
The best practice when dealing with this variable is to not use it at all. Instead, developers should use the r.Velocity.EnableVertexDeformation variable for controlling vertex deformation velocity output.
Regarding the associated variable CVarVertexDeformationOutputsVelocity:
The purpose of CVarVertexDeformationOutputsVelocity is to provide C++ code access to the r.VertexDeformationOutputsVelocity console variable.
It’s used in the Renderer module, specifically in the velocity rendering system.
The value is set when the console variable is initialized, with a default value of -1.
It interacts directly with the r.VertexDeformationOutputsVelocity console variable, essentially serving as its C++ representation.
Developers should be aware that this variable is part of a deprecated system and should not be used in new code.
The best practice is to replace any usage of CVarVertexDeformationOutputsVelocity with the newer r.Velocity.EnableVertexDeformation system.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VelocityRendering.cpp:43
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarVertexDeformationOutputsVelocity(
TEXT("r.VertexDeformationOutputsVelocity"),
-1,
TEXT("Deprecated CVar. Use r.Velocity.EnableVertexDeformation instead.\n"),
ECVF_ReadOnly | ECVF_RenderThreadSafe);
static TAutoConsoleVariable<int32> CVarParallelVelocity(
TEXT("r.ParallelVelocity"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarVertexDeformationOutputsVelocity
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VelocityRendering.cpp:42
Scope: file
Source code excerpt:
ECVF_ReadOnly | ECVF_RenderThreadSafe);
static TAutoConsoleVariable<int32> CVarVertexDeformationOutputsVelocity(
TEXT("r.VertexDeformationOutputsVelocity"),
-1,
TEXT("Deprecated CVar. Use r.Velocity.EnableVertexDeformation instead.\n"),
ECVF_ReadOnly | ECVF_RenderThreadSafe);
static TAutoConsoleVariable<int32> CVarParallelVelocity(
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VelocityRendering.cpp:77
Scope (from outer to inner):
file
function inline void ValidateVelocityCVars
Source code excerpt:
}
{
const int32 Value = CVarVertexDeformationOutputsVelocity.GetValueOnAnyThread();
if (Value != -1)
{
UE_LOG(LogRenderer, Warning, TEXT("Deprecated CVar r.VertexDeformationOutputsVelocity is set to %d. Remove and use r.Velocity.EnableVertexDeformation instead."), Value);
}
}
bHasValidatedCVars = true;