bSupportsHairStrandGeometry
bSupportsHairStrandGeometry
#Overview
name: bSupportsHairStrandGeometry
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 bSupportsHairStrandGeometry is to indicate whether a specific shader platform supports hair strand geometry rendering. This setting is part of Unreal Engine’s rendering system, specifically related to advanced hair rendering capabilities.
Based on the callsites, this variable is primarily used within the RHI (Rendering Hardware Interface) module of Unreal Engine. It’s a part of the FGenericDataDrivenShaderPlatformInfo class, which provides information about various shader platform capabilities.
The value of this variable is set during the parsing of data-driven shader information. This occurs in the ParseDataDrivenShaderInfo function within the DataDrivenShaderPlatformInfo.cpp file.
This variable interacts with other shader platform capability flags, such as bWaterUsesSimpleForwardShading, bSupportsDOFHybridScattering, and others. These flags collectively define the features supported by a particular shader platform.
Developers must be aware that this variable is platform-specific. Its value may differ across different rendering platforms, affecting the availability of hair strand geometry rendering features in their game or application.
Best practices when using this variable include:
- Always check for platform support before attempting to use hair strand geometry features.
- Use the provided static function GetSupportsHairStrandGeometry(Platform) to query support, rather than accessing the variable directly.
- Consider providing fallback rendering methods for platforms that don’t support hair strand geometry.
- Be mindful of performance implications when enabling hair strand geometry on supported platforms, as it can be computationally expensive.
- Ensure that art assets and shaders are appropriately configured to take advantage of this feature when it’s available.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:60, section: [ShaderPlatform METAL_SM5]
- INI Section:
ShaderPlatform METAL_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:100, section: [ShaderPlatform METAL_SM6]
- INI Section:
ShaderPlatform METAL_SM6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:119, section: [ShaderPlatform VULKAN_SM5]
- INI Section:
ShaderPlatform VULKAN_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:237, section: [ShaderPlatform VULKAN_SM6]
- INI Section:
ShaderPlatform VULKAN_SM6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:61, section: [ShaderPlatform PCD3D_SM5]
- INI Section:
ShaderPlatform PCD3D_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:122, section: [ShaderPlatform PCD3D_SM6]
- INI Section:
ShaderPlatform PCD3D_SM6
- 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:268
Scope (from outer to inner):
file
function void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo
Source code excerpt:
GET_SECTION_BOOL_HELPER(bWaterUsesSimpleForwardShading);
GET_SECTION_BOOL_HELPER(bSupportsHairStrandGeometry);
GET_SECTION_BOOL_HELPER(bSupportsDOFHybridScattering);
GET_SECTION_BOOL_HELPER(bNeedsExtraMobileFrames);
GET_SECTION_BOOL_HELPER(bSupportsHZBOcclusion);
GET_SECTION_BOOL_HELPER(bSupportsWaterIndirectDraw);
GET_SECTION_BOOL_HELPER(bSupportsAsyncPipelineCompilation);
GET_SECTION_BOOL_HELPER(bSupportsVertexShaderSRVs);
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:91
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
Source code excerpt:
uint32 NumberOfComputeThreads : 10;
uint32 bWaterUsesSimpleForwardShading : 1;
uint32 bSupportsHairStrandGeometry : 1;
uint32 bSupportsDOFHybridScattering : 1;
uint32 bNeedsExtraMobileFrames : 1;
uint32 bSupportsHZBOcclusion : 1;
uint32 bSupportsWaterIndirectDraw : 1;
uint32 bSupportsAsyncPipelineCompilation : 1;
uint32 bSupportsVertexShaderSRVs : 1; // Whether SRVs can be bound to vertex shaders (may be independent from ManualVertexFetch)
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:629
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
function static const bool GetSupportsHairStrandGeometry
Source code excerpt:
{
check(IsValid(Platform));
return Infos[Platform].bSupportsHairStrandGeometry;
}
static FORCEINLINE_DEBUGGABLE const bool GetSupportsDOFHybridScattering(const FStaticShaderPlatform Platform)
{
check(IsValid(Platform));
return Infos[Platform].bSupportsDOFHybridScattering;