r.Water.SingleLayer.SSRTAA
r.Water.SingleLayer.SSRTAA
#Overview
name: r.Water.SingleLayer.SSRTAA
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Enable SSR denoising using TAA for the single layer water rendering system.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Water.SingleLayer.SSRTAA is to enable or disable Screen Space Reflection (SSR) denoising using Temporal Anti-Aliasing (TAA) for the single layer water rendering system in Unreal Engine 5.
This setting variable is primarily used by the rendering system, specifically for water rendering. It is part of the single layer water rendering system, which is a subsystem within the Unreal Engine’s renderer module.
The value of this variable is set through a console variable (CVar) named CVarWaterSingleLayerSSRTAA. It is initialized with a default value of 1, meaning the feature is enabled by default. The value can be changed at runtime through console commands or project settings.
The associated variable CVarWaterSingleLayerSSRTAA directly interacts with r.Water.SingleLayer.SSRTAA. They share the same value and purpose.
Developers must be aware that this variable affects the quality and performance of water reflections in their game. Enabling this feature (value set to 1) will apply TAA-based denoising to the screen space reflections on water surfaces, which can improve visual quality but may have a performance cost.
Best practices when using this variable include:
- Testing the visual impact and performance with the feature enabled and disabled to determine the best setting for your project.
- Considering the target hardware when deciding whether to enable this feature, as it may have a more significant performance impact on lower-end devices.
- Using this in conjunction with other water rendering settings to achieve the desired balance between visual quality and performance.
Regarding the associated variable CVarWaterSingleLayerSSRTAA:
- Its purpose is the same as r.Water.SingleLayer.SSRTAA - to control SSR denoising using TAA for single layer water rendering.
- It is used in the renderer module, specifically in the SingleLayerWaterRendering.cpp file.
- The value is set when the variable is initialized, but can be changed at runtime.
- It directly controls whether the TAA pass is applied to water reflections in the rendering pipeline.
- Developers should be aware that this variable is checked on the render thread, so changes will take effect in the next frame.
- Best practices include using this variable for fine-tuning water rendering performance and quality, and potentially exposing it as a graphics option for end-users if water reflection quality is a significant aspect of the game’s visuals.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SingleLayerWaterRendering.cpp:61
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarWaterSingleLayerSSRTAA(
TEXT("r.Water.SingleLayer.SSRTAA"), 1,
TEXT("Enable SSR denoising using TAA for the single layer water rendering system."),
ECVF_RenderThreadSafe | ECVF_Scalability);
//
// Shadows
#Associated Variable and Callsites
This variable is associated with another variable named CVarWaterSingleLayerSSRTAA
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SingleLayerWaterRendering.cpp:60
Scope: file
Source code excerpt:
ECVF_RenderThreadSafe | ECVF_Scalability);
static TAutoConsoleVariable<int32> CVarWaterSingleLayerSSRTAA(
TEXT("r.Water.SingleLayer.SSRTAA"), 1,
TEXT("Enable SSR denoising using TAA for the single layer water rendering system."),
ECVF_RenderThreadSafe | ECVF_Scalability);
//
// Shadows
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SingleLayerWaterRendering.cpp:1043
Scope: file
Source code excerpt:
ReflectionsColor = DenoiserInputs.Color;
if (CVarWaterSingleLayerSSRTAA.GetValueOnRenderThread() && ScreenSpaceRayTracing::IsSSRTemporalPassRequired(View)) // TAA pass is an option
{
check(View.ViewState);
FTAAPassParameters TAASettings(View);
TAASettings.SceneDepthTexture = SceneTextureParameters.SceneDepthTexture;
TAASettings.SceneVelocityTexture = SceneTextureParameters.GBufferVelocityTexture;
TAASettings.Pass = ETAAPassConfig::ScreenSpaceReflections;