r.PathTracing.TemporalDenoiser.VisWarp
r.PathTracing.TemporalDenoiser.VisWarp
#Overview
name: r.PathTracing.TemporalDenoiser.VisWarp
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
0: disable1: visualize warped source by the motion vector2: weights, warped source, and combined
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.PathTracing.TemporalDenoiser.VisWarp is to control the visualization of warping in the path tracing temporal denoiser. It is used for debugging and analysis of the temporal denoising process in the rendering system.
This setting variable is primarily used in the Renderer module of Unreal Engine, specifically within the path tracing and denoising subsystem. It is referenced in the PathTracingSpatialTemporalDenoising.cpp file, which suggests it’s part of the path tracing spatial-temporal denoising functionality.
The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 0 and can be changed at runtime.
The associated variable CVarPathTracingTemporalDenoiserVisWarp interacts directly with r.PathTracing.TemporalDenoiser.VisWarp. They share the same value and purpose.
Developers must be aware that this variable has three possible states: 0: Visualization is disabled (default) 1: Visualize warped source by the motion vector 2: Visualize weights, warped source, and combined result
When using this variable, developers should consider the following best practices:
- Use it primarily for debugging and analysis purposes, not in production builds.
- Be aware that enabling visualization (values 1 or 2) may impact performance.
- Use in conjunction with other debugging tools to get a comprehensive understanding of the denoising process.
- Remember to disable it (set to 0) when not actively debugging to avoid unnecessary performance overhead.
Regarding the associated variable CVarPathTracingTemporalDenoiserVisWarp:
The purpose of CVarPathTracingTemporalDenoiserVisWarp is the same as r.PathTracing.TemporalDenoiser.VisWarp. It’s the actual console variable that controls the visualization of warping in the path tracing temporal denoiser.
This variable is used in the Renderer module, specifically in the path tracing and denoising subsystem. It’s referenced in the same file (PathTracingSpatialTemporalDenoising.cpp) as the main variable.
The value of CVarPathTracingTemporalDenoiserVisWarp is set through the console variable system and can be changed at runtime. It’s initialized with a default value of 0.
CVarPathTracingTemporalDenoiserVisWarp interacts directly with r.PathTracing.TemporalDenoiser.VisWarp, as they represent the same setting.
Developers should be aware that this variable is used in the ShouldVisualizeWarping function to determine if warping visualization should be enabled. It’s checked against 0 to make this determination.
Best practices for using CVarPathTracingTemporalDenoiserVisWarp are the same as those for r.PathTracing.TemporalDenoiser.VisWarp, as they are effectively the same variable.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PathTracingSpatialTemporalDenoising.cpp:208
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
TAutoConsoleVariable<int32> CVarPathTracingTemporalDenoiserVisWarp(
TEXT("r.PathTracing.TemporalDenoiser.VisWarp"),
0,
TEXT("0: disable")
TEXT("1: visualize warped source by the motion vector")
TEXT("2: weights, warped source, and combined"),
ECVF_RenderThreadSafe
);
#Associated Variable and Callsites
This variable is associated with another variable named CVarPathTracingTemporalDenoiserVisWarp
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PathTracingSpatialTemporalDenoising.cpp:207
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
);
TAutoConsoleVariable<int32> CVarPathTracingTemporalDenoiserVisWarp(
TEXT("r.PathTracing.TemporalDenoiser.VisWarp"),
0,
TEXT("0: disable")
TEXT("1: visualize warped source by the motion vector")
TEXT("2: weights, warped source, and combined"),
ECVF_RenderThreadSafe
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PathTracingSpatialTemporalDenoising.cpp:488
Scope (from outer to inner):
file
function static bool ShouldVisualizeWarping
Source code excerpt:
static bool ShouldVisualizeWarping(const FPathTracingSpatialTemporalDenoisingContext& DenoisingContext)
{
return CVarPathTracingTemporalDenoiserVisWarp.GetValueOnRenderThread() != 0 &&
DenoisingContext.MotionVector && DenoisingContext.LastDenoisedRadianceTexture;
}
static int32 GetTemporalAccumulationPatchCount()
{
return FMath::Clamp(CVarPathTracingTemporalDenoiserPatchCount.GetValueOnRenderThread(), 1, 16);