bSupportsVertexShaderLayer
bSupportsVertexShaderLayer
#Overview
name: bSupportsVertexShaderLayer
The value of this variable can be defined or overridden in .ini config files. 9
.ini config files referencing this setting variable.
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bSupportsVertexShaderLayer is to indicate whether a specific shader platform supports vertex shader layer functionality. This is primarily related to the rendering system in Unreal Engine 5.
This setting variable is utilized within the RHI (Rendering Hardware Interface) module of Unreal Engine. Specifically, it’s part of the data-driven shader platform information system, which allows for flexible configuration of shader platform capabilities.
The value of this variable is set through the data-driven shader platform info parsing process, as seen in the ParseDataDrivenShaderInfo function in DataDrivenShaderPlatformInfo.cpp. It’s likely populated from a configuration file or other external data source.
bSupportsVertexShaderLayer interacts with other shader platform capability flags, such as bSupportsInstancedStereo, as seen in the UpdatePreviewPlatforms function. These flags collectively define the features and limitations of a particular shader platform.
Developers must be aware that this variable’s value can differ across different shader platforms. It’s crucial to check for support before attempting to use vertex shader layer functionality in rendering code.
Best practices when using this variable include:
- Always check for support using the GetSupportsVertexShaderLayer function before utilizing vertex shader layer features.
- Consider providing fallback rendering paths for platforms that don’t support vertex shader layers.
- Be mindful of performance implications when using vertex shader layers, even on supported platforms.
- Keep the data-driven shader platform information up-to-date to ensure accurate representation of platform capabilities.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:82, section: [ShaderPlatform VULKAN_ES3_1_ANDROID]
- INI Section:
ShaderPlatform VULKAN_ES3_1_ANDROID
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:44, section: [ShaderPlatform METAL_SM5]
- INI Section:
ShaderPlatform METAL_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:84, section: [ShaderPlatform METAL_SM6]
- INI Section:
ShaderPlatform METAL_SM6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:124, section: [ShaderPlatform VULKAN_SM5]
- INI Section:
ShaderPlatform VULKAN_SM5
- Raw value:
false
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:242, section: [ShaderPlatform VULKAN_SM6]
- INI Section:
ShaderPlatform VULKAN_SM6
- Raw value:
false
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:271, section: [ShaderPlatform VULKAN_PCES3_1]
- INI Section:
ShaderPlatform VULKAN_PCES3_1
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:65, section: [ShaderPlatform PCD3D_SM5]
- INI Section:
ShaderPlatform PCD3D_SM5
- Raw value:
false
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:124, section: [ShaderPlatform PCD3D_SM6]
- INI Section:
ShaderPlatform PCD3D_SM6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:156, section: [ShaderPlatform PCD3D_ES3_1]
- INI Section:
ShaderPlatform PCD3D_ES3_1
- Raw value:
true
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/DataDrivenShaderPlatformInfo.cpp:279
Scope (from outer to inner):
file
function void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo
Source code excerpt:
GET_SECTION_BOOL_HELPER(bOverrideFMaterial_NeedsGBufferEnabled);
GET_SECTION_BOOL_HELPER(bSupportsFFTBloom);
GET_SECTION_BOOL_HELPER(bSupportsVertexShaderLayer);
GET_SECTION_BINDLESS_SUPPORT_HELPER(BindlessSupport);
GET_SECTION_BOOL_HELPER(bSupportsVolumeTextureAtomics);
GET_SECTION_BOOL_HELPER(bSupportsROV);
GET_SECTION_BOOL_HELPER(bSupportsOIT);
GET_SECTION_SUPPORT_HELPER(bSupportsRealTypes);
GET_SECTION_INT_HELPER(EnablesHLSL2021ByDefault);
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/DataDrivenShaderPlatformInfo.cpp:449
Scope (from outer to inner):
file
function void FGenericDataDrivenShaderPlatformInfo::UpdatePreviewPlatforms
Source code excerpt:
{
PREVIEW_USE_RUNTIME_VALUE(bSupportsInstancedStereo);
PREVIEW_USE_RUNTIME_VALUE(bSupportsVertexShaderLayer);
}
else
{
PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsInstancedStereo);
}
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:104
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
Source code excerpt:
uint32 bSupportsInlineRayTracing : 1;
uint32 bSupportsRayTracingShaders : 1;
uint32 bSupportsVertexShaderLayer : 1;
uint32 BindlessSupport : int32(ERHIBindlessSupport::NumBits);
uint32 bSupportsVolumeTextureAtomics : 1;
uint32 bSupportsROV : 1;
uint32 bSupportsOIT : 1;
uint32 bSupportsRealTypes : int32(ERHIFeatureSupport::NumBits);
uint32 EnablesHLSL2021ByDefault : 2; // 0: disabled, 1: global shaders only, 2: all shaders
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:702
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
function static const bool GetSupportsVertexShaderLayer
Source code excerpt:
{
check(IsValid(Platform));
return Infos[Platform].bSupportsVertexShaderLayer;
}
static FORCEINLINE_DEBUGGABLE const ERHIBindlessSupport GetBindlessSupport(const FStaticShaderPlatform Platform)
{
check(IsValid(Platform));
return static_cast<ERHIBindlessSupport>(Infos[Platform].BindlessSupport);