bSupportsCapsuleShadows

bSupportsCapsuleShadows

#Overview

name: bSupportsCapsuleShadows

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

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bSupportsCapsuleShadows is to indicate whether a specific shader platform supports capsule shadows in the rendering system.

This setting variable is primarily used within the RHI (Rendering Hardware Interface) module of Unreal Engine 5. It is part of the data-driven shader platform information system, which allows for flexible configuration of rendering capabilities across different hardware platforms.

The value of this variable is set through the data-driven shader platform information parsing process, as seen in the ParseDataDrivenShaderInfo function in DataDrivenShaderPlatformInfo.cpp. It is likely populated from a configuration file or another external source during engine initialization.

bSupportsCapsuleShadows interacts with other rendering capability flags in the FGenericDataDrivenShaderPlatformInfo class, such as bSupportsDiaphragmDOF, bSupportsRGBColorBuffer, and bSupportsPercentageCloserShadows. These flags collectively define the rendering features supported by a particular shader platform.

Developers must be aware that this variable is platform-specific and its value may differ across various hardware configurations. It’s crucial to check this flag before attempting to use capsule shadows in rendering code to ensure compatibility with the current platform.

Best practices when using this variable include:

  1. Always check the value using the GetSupportsCapsuleShadows() function before enabling or using capsule shadow features in rendering code.
  2. Consider providing fallback rendering methods for platforms that don’t support capsule shadows.
  3. Use this information to optimize rendering paths and avoid unnecessary calculations on platforms that don’t support the feature.
  4. When developing cross-platform applications, test on various hardware to ensure proper handling of this capability flag.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:50, section: [ShaderPlatform METAL_SM5]

Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:90, section: [ShaderPlatform METAL_SM6]

Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:35, section: [ShaderPlatform VULKAN_SM5]

Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:162, section: [ShaderPlatform VULKAN_SM6]

Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:67, section: [ShaderPlatform PCD3D_SM5]

Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:126, section: [ShaderPlatform PCD3D_SM6]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/DataDrivenShaderPlatformInfo.cpp:209

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo

Source code excerpt:

	GET_SECTION_BOOL_HELPER(bSupportsDiaphragmDOF);
	GET_SECTION_BOOL_HELPER(bSupportsRGBColorBuffer);
	GET_SECTION_BOOL_HELPER(bSupportsCapsuleShadows);
	GET_SECTION_BOOL_HELPER(bSupportsPercentageCloserShadows);
	GET_SECTION_BOOL_HELPER(bSupportsIndexBufferUAVs);
	GET_SECTION_BOOL_HELPER(bSupportsInstancedStereo);
	GET_SECTION_SUPPORT_HELPER(SupportsMultiViewport);
	GET_SECTION_BOOL_HELPER(bSupportsMSAA);
	GET_SECTION_BOOL_HELPER(bSupports4ComponentUAVReadWrite);

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:35

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo

Source code excerpt:

	uint32 bSupportsDiaphragmDOF : 1;
	uint32 bSupportsRGBColorBuffer : 1;
	uint32 bSupportsCapsuleShadows : 1;
	uint32 bSupportsPercentageCloserShadows : 1;
	uint32 bSupportsIndexBufferUAVs : 1;
	uint32 bSupportsInstancedStereo : 1;
	uint32 SupportsMultiViewport : int32(ERHIFeatureSupport::NumBits);
	uint32 bSupportsMSAA : 1;
	uint32 bSupports4ComponentUAVReadWrite : 1;

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:269

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo
function     static const bool GetSupportsCapsuleShadows

Source code excerpt:

	{
		check(IsValid(Platform));
		return Infos[Platform].bSupportsCapsuleShadows;
	}

	static FORCEINLINE_DEBUGGABLE const bool GetSupportsPercentageCloserShadows(const FStaticShaderPlatform Platform)
	{
		check(IsValid(Platform));
		return Infos[Platform].bSupportsPercentageCloserShadows;