r.Water.SingleLayer.SSRTAA

r.Water.SingleLayer.SSRTAA

#Overview

name: r.Water.SingleLayer.SSRTAA

This variable is created as a Console Variable (cvar).

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:

  1. Testing the visual impact and performance with the feature enabled and disabled to determine the best setting for your project.
  2. Considering the target hardware when deciding whether to enable this feature, as it may have a more significant performance impact on lower-end devices.
  3. Using this in conjunction with other water rendering settings to achieve the desired balance between visual quality and performance.

Regarding the associated variable CVarWaterSingleLayerSSRTAA:

#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;