r.PostProcessing.DownsampleChainQuality
r.PostProcessing.DownsampleChainQuality
#Overview
name: r.PostProcessing.DownsampleChainQuality
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Defines the quality used for downsampling to the scene color in scene color chains.\n 0: low quality\n 1: high quality (default)\n
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.PostProcessing.DownsampleChainQuality is to define the quality used for downsampling the scene color in scene color chains. This setting variable is used in the post-processing pipeline of Unreal Engine 5.
-
The Unreal Engine rendering system, specifically the post-processing module, relies on this setting variable.
-
The value of this variable is set through a console variable (CVarDownsampleChainQuality) defined earlier in the code.
-
This variable interacts with the GetDownsampleQuality function, which likely translates the integer value into an enumeration representing the quality level.
-
Developers should be aware that this variable affects the quality of downsampling operations in the post-processing chain, which can impact both visual quality and performance.
-
Best practices when using this variable include:
- Adjusting it based on the target hardware capabilities and performance requirements.
- Testing different values to find the optimal balance between visual quality and performance.
- Considering its impact on the entire post-processing pipeline, as it may affect subsequent operations.
Regarding the associated variable CVarDownsampleChainQuality:
- It’s a TAutoConsoleVariable
, which means it’s an integer console variable that can be changed at runtime. - It’s initialized with a default value of 1, which corresponds to high quality.
- It has options for low quality (0) and high quality (1).
- This console variable is marked with ECVF_Scalability and ECVF_RenderThreadSafe flags, indicating it’s used for scalability settings and is safe to access from the render thread.
- Developers can modify this variable through console commands or project settings to adjust the downsampling quality dynamically.
In summary, r.PostProcessing.DownsampleChainQuality and its associated console variable CVarDownsampleChainQuality provide a way to control the quality of downsampling operations in the post-processing pipeline, allowing developers to balance visual quality and performance in their Unreal Engine 5 projects.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.cpp:130
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
TAutoConsoleVariable<int32> CVarDownsampleChainQuality(
TEXT("r.PostProcessing.DownsampleChainQuality"), 1,
TEXT("Defines the quality used for downsampling to the scene color in scene color chains.\n")
TEXT(" 0: low quality\n")
TEXT(" 1: high quality (default)\n"),
ECVF_Scalability | ECVF_RenderThreadSafe);
#if !(UE_BUILD_SHIPPING)
#Associated Variable and Callsites
This variable is associated with another variable named CVarDownsampleChainQuality
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.cpp:129
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
ECVF_Scalability | ECVF_RenderThreadSafe);
TAutoConsoleVariable<int32> CVarDownsampleChainQuality(
TEXT("r.PostProcessing.DownsampleChainQuality"), 1,
TEXT("Defines the quality used for downsampling to the scene color in scene color chains.\n")
TEXT(" 0: low quality\n")
TEXT(" 1: high quality (default)\n"),
ECVF_Scalability | ECVF_RenderThreadSafe);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.cpp:591
Scope (from outer to inner):
file
function void AddPostProcessingPasses
Source code excerpt:
const EAntiAliasingMethod AntiAliasingMethod = !bVisualizeDepthOfField ? View.AntiAliasingMethod : AAM_None;
const EDownsampleQuality DownsampleQuality = GetDownsampleQuality(CVarDownsampleQuality);
const EDownsampleQuality DownsampleChainQuality = GetDownsampleQuality(CVarDownsampleChainQuality);
const EPixelFormat DownsampleOverrideFormat = PF_FloatRGB;
// Previous transforms are nonsensical on camera cuts, unless motion vector simulation is enabled (providing FrameN+1 transforms to FrameN+0)
const bool bMotionBlurValid = FMotionVectorSimulation::IsEnabled() || (!View.bCameraCut && !View.bPrevTransformsReset);
// Motion blur gets replaced by the visualization pass.