Navigation
API > API/Runtime > API/Runtime/RenderCore
Shader Platform Configuration
Similar to DataDrivenShaderPlatformInfo (DDSPI), but settings come from Engine config hierarchy. DDSPI is specifically for immutable shader platform capabilities, while SPC is for shader platform configuration.
Configs are stored in one section per shader platform with the same names that DDSPI uses. ex: [ShaderPlatform PCD3D_SM6] -> [ShaderPlatformConfig PCD3D_SM6]
Interface initially built with static getters but those use per-platform structs with getters. While the static getters suffice for initial adoption, the ideal usage would be passing the per-platform struct around to code that needs them. This usage would make it easier to adopt "custom shader platforms" in the future.
New fields need the following:
Value inside FPlatformConfig
Member getter inside FPlatformConfig
Static getter inside FShaderPlatformConfig
Default value inside FShaderPlatformConfig::FPlatformConfig::SetDefaultValues
Initialization inside FShaderPlatformConfig::FPlatformConfig::InitializeProperties
(optional) Engine defaults inside Base{Platform}Engine.ini
(optional) Preview override inside FShaderPlatformConfig::FPlatformConfig::InitializePropertiesForPreview
| Name | FShaderPlatformConfig |
| Type | class |
| Header File | /Engine/Source/Runtime/RenderCore/Public/ShaderPlatformConfig.h |
| Include Path | #include "ShaderPlatformConfig.h" |
Syntax
class FShaderPlatformConfig
Structs
| Name | Remarks |
|---|---|
| FPlatformConfig |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| PlatformConfigs | FPlatformConfig | ShaderPlatformConfig.h |
Functions
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static const ERHIBindlessConfiguration GetBindlessConfiguration
(
const FStaticShaderPlatform Platform |
ShaderPlatformConfig.h | ||
static const bool GetEnableNaniteBindlessPixelProgrammable
(
const FStaticShaderPlatform Platform |
Returns whether Nanite bindless-aware pixel programmable materials are enabled for the given platform. | ShaderPlatformConfig.h | |
static const bool GetEnableNaniteBindlessRasterization
(
const FStaticShaderPlatform Platform |
Returns whether Nanite bindless-aware rasterization is enabled for the given platform. | ShaderPlatformConfig.h | |
static const bool GetEnableNaniteBindlessShading
(
const FStaticShaderPlatform Platform |
Returns whether Nanite bindless-aware shading is enabled for the given platform. | ShaderPlatformConfig.h | |
static const uint32 GetSubstrateMaxClosuresPerPixel
(
const FStaticShaderPlatform Platform |
ShaderPlatformConfig.h | ||
static void Initialize() |
ShaderPlatformConfig.h | ||
static const bool IsValid
(
const FStaticShaderPlatform Platform |
ShaderPlatformConfig.h |