r.SSS.Quality

r.SSS.Quality

#Overview

name: r.SSS.Quality

The value of this variable can be defined or overridden in .ini config files. 6 .ini config files referencing this setting variable.

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.SSS.Quality is to define the quality of the recombine pass when using the SubsurfaceScatteringProfile shading model in Unreal Engine 5’s rendering system.

This setting variable is primarily used by the Renderer module, specifically in the post-processing subsystem for subsurface scattering effects. It affects the quality-performance trade-off of the subsurface scattering implementation.

The value of this variable is set through the console variable system, with a default value of 0 (low quality, faster performance). It can be changed at runtime using console commands or through engine configuration files.

The associated variable CVarSSSQuality interacts directly with r.SSS.Quality, as it is the actual console variable object that stores and manages the value. The GetSSSQuality() function is used to retrieve the current value of this setting.

Developers should be aware that:

  1. Higher quality settings (1) will result in sharper details but slower performance.
  2. The auto setting (-1) will use high quality if Temporal Anti-Aliasing (TAA) is disabled, as the quality difference is more noticeable without TAA.
  3. This setting is marked as scalable, meaning it can be adjusted based on the target hardware capabilities.

Best practices when using this variable include:

  1. Consider the target hardware when setting the quality level.
  2. Use the auto setting (-1) if you want the engine to determine the best quality based on other rendering settings (like TAA).
  3. Profile the performance impact when changing this setting, especially on lower-end hardware.
  4. Be aware of the interaction with Temporal Anti-Aliasing when adjusting this setting.

Regarding the associated variable CVarSSSQuality:

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseDeviceProfiles.ini:907, section: [Android_Vulkan_SM5 DeviceProfile]

Location: <Workspace>/Engine/Config/BaseScalability.ini:621, section: [EffectsQuality@0]

Location: <Workspace>/Engine/Config/BaseScalability.ini:648, section: [EffectsQuality@1]

Location: <Workspace>/Engine/Config/BaseScalability.ini:675, section: [EffectsQuality@2]

Location: <Workspace>/Engine/Config/BaseScalability.ini:702, section: [EffectsQuality@3]

Location: <Workspace>/Engine/Config/BaseScalability.ini:730, section: [EffectsQuality@Cine]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessSubsurface.cpp:53

Scope (from outer to inner):

file
namespace    anonymous

Source code excerpt:


	TAutoConsoleVariable<int32> CVarSSSQuality(
		TEXT("r.SSS.Quality"),
		0,
		TEXT("Defines the quality of the recombine pass when using the SubsurfaceScatteringProfile shading model\n")
		TEXT(" 0: low (faster, default)\n")
		TEXT(" 1: high (sharper details but slower)\n")
		TEXT("-1: auto, 1 if TemporalAA is disabled (without TemporalAA the quality is more noticable)"),
		ECVF_RenderThreadSafe | ECVF_Scalability);

#Associated Variable and Callsites

This variable is associated with another variable named CVarSSSQuality. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessSubsurface.cpp:52

Scope (from outer to inner):

file
namespace    anonymous

Source code excerpt:

		ECVF_RenderThreadSafe | ECVF_Scalability);

	TAutoConsoleVariable<int32> CVarSSSQuality(
		TEXT("r.SSS.Quality"),
		0,
		TEXT("Defines the quality of the recombine pass when using the SubsurfaceScatteringProfile shading model\n")
		TEXT(" 0: low (faster, default)\n")
		TEXT(" 1: high (sharper details but slower)\n")
		TEXT("-1: auto, 1 if TemporalAA is disabled (without TemporalAA the quality is more noticable)"),

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessSubsurface.cpp:199

Scope (from outer to inner):

file
function     int32 GetSSSQuality

Source code excerpt:

int32 GetSSSQuality()
{
	return CVarSSSQuality.GetValueOnRenderThread();
}

int32 GetSSSBurleyBilateralFilterKernelFunctionType()
{
	return CVarSSSBurleyBilateralFilterKernelFunctionType.GetValueOnRenderThread();
}