r.Water.SingleLayer.ShadersSupportVSMFiltering

r.Water.SingleLayer.ShadersSupportVSMFiltering

#Overview

name: r.Water.SingleLayer.ShadersSupportVSMFiltering

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

It is referenced in 2 C++ source files.

#Summary

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SingleLayerWaterRendering.cpp:84

Scope: file

Source code excerpt:


static TAutoConsoleVariable<int32> CVarWaterSingleLayerShadersSupportVSMFiltering(
	TEXT("r.Water.SingleLayer.ShadersSupportVSMFiltering"), 0,
	TEXT("Whether or not the single layer water material shaders are compiled with support for virtual shadow map filter, i.e. output main directional light luminance in a separate render target. This is preconditioned on using deferred shading and having VSM support enabled in the project."),
	ECVF_ReadOnly | ECVF_RenderThreadSafe);

static TAutoConsoleVariable<int32> CVarWaterSingleLayerVSMFiltering(
	TEXT("r.Water.SingleLayer.VSMFiltering"), 0,
	TEXT("When using deferred, virtual shadow map filtering is supported on single layer water. This cvar can be used to toggle it on/off at runtime."),

#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/RenderUtils.cpp:1390

Scope (from outer to inner):

file
function     bool IsWaterVirtualShadowMapFilteringEnabled

Source code excerpt:

bool IsWaterVirtualShadowMapFilteringEnabled(const FStaticShaderPlatform Platform)
{
	static const auto CVarWaterSingleLayerShaderSupportVSMFiltering = IConsoleManager::Get().FindConsoleVariable(TEXT("r.Water.SingleLayer.ShadersSupportVSMFiltering"));
	const bool bWaterVSMFilteringSupported = CVarWaterSingleLayerShaderSupportVSMFiltering && (CVarWaterSingleLayerShaderSupportVSMFiltering->GetInt() > 0);

	const bool bVirtualShadowMapsSupported = DoesPlatformSupportVirtualShadowMaps(Platform);

	return !IsForwardShadingEnabled(Platform) && bWaterVSMFilteringSupported && bVirtualShadowMapsSupported;
}