Navigation
API > API/Runtime > API/Runtime/RenderCore
A compiled shader and its parameter bindings.
| Name | FShader |
| Type | class |
| Header File | /Engine/Source/Runtime/RenderCore/Public/Shader.h |
| Include Path | #include "Shader.h" |
Syntax
class FShader
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FShader
(
const CompiledShaderInitializerType& Initializer |
Construct a shader from shader compiler output. | Shader.h | |
FShader () |
Used to construct a shader for deserialization. | Shader.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FShader() |
Shader.h |
Structs
| Name | Remarks |
|---|---|
| InternalLinkType |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| CompiledShaderInitializerType | FShaderCompiledShaderInitializerType | Shader.h | |
| DerivedType | FShader | Shader.h | |
| FPermutationDomain | FShaderPermutationNone | Shader.h | |
| FPermutationParameters | FShaderPermutationParameters | Shader.h | |
| FShaderStatisticMap | TMemoryImageMap< ShaderStatKeyType, FShaderStatVariant > | Shader.h | |
| InternalBaseType | typename TGetBaseTypeHelper< FShader >::Type | Shader.h | |
| ShaderMetaType | FShaderType | Shader.h | |
| ShaderStatKeyType | FMemoryImageName | Shader.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| CounterBase | int | Shader.h | |
| InterfaceType | ETypeLayoutInterface::Type | Shader.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| FShaderParameterBindingsBindings | Shader.h | |||
| FShaderParameterMapInfoParameterMapInfo | Shader.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| FShaderTargetTarget | Target platform and frequency. | Shader.h | ||
| int32ResourceIndex | Index of this shader within the FShaderMapResource | Shader.h | ||
| Type | TIndexedPtr< FShaderType > | Shader.h | ||
| uint32CodeSize | Size of shader's compiled code | Shader.h | ||
| uint32NumInstructions | The number of instructions the shader takes to execute. | Shader.h | ||
| uint32NumTextureSamplers | Number of texture samplers the shader uses. | Shader.h | ||
| uint32SortKey | Truncated version of OutputHash, intended for sorting. | Shader.h | ||
| VFType | TIndexedPtr< FVertexFactoryType > | Shader.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void DumpDebugInfo
(
const FShaderMapPointerTable& InPtrTable |
Shader.h | ||
void Finalize
(
const FShaderMapResourceCode* Code |
Shader.h | ||
const FShaderParametersMetadata * FindAutomaticallyBoundUniformBufferStruct
(
int32 BaseIndex |
Shader.h | ||
uint32 GetCodeSize() |
Shader.h | ||
EShaderFrequency GetFrequency() |
Shader.h | ||
const FSHAHash & GetHash() |
Returns the hash of the shader file that this shader was compiled with. | Shader.h | |
uint32 GetNumInstructions() |
Shader.h | ||
uint32 GetNumTextureSamplers() |
Shader.h | ||
const FSHAHash & GetOutputHash() |
Shader.h | ||
int32 GetResourceIndex() |
Shader.h | ||
EShaderPlatform GetShaderPlatform() |
Shader.h | ||
uint32 GetSortKey() |
Returns an identifier suitable for deterministic sorting of shaders between sessions. | Shader.h | |
const FShaderTarget GetTarget() |
Shader.h | ||
FShaderType * GetType
(
const FPointerTableBase* InPointerTable |
Shader.h | ||
FShaderType * GetType
(
const FShaderMapPointerTable& InPointerTable |
Accessors. | Shader.h | |
const FTypeLayoutDesc & GetTypeLayout() |
Shader.h | ||
FShaderType * GetTypeUnfrozen() |
Shader.h | ||
const TShaderUniformBufferParameter< UniformBufferStructType > & GetUniformBufferParameter () |
Finds an automatically bound uniform buffer matching the given uniform buffer type if one exists, or returns an unbound parameter. | Shader.h | |
const FShaderUniformBufferParameter & GetUniformBufferParameter
(
const FShaderParametersMetadata* SearchStruct |
Finds an automatically bound uniform buffer matching the given uniform buffer struct if one exists, or returns an unbound parameter. | Shader.h | |
const FShaderUniformBufferParameter & GetUniformBufferParameter
(
const FHashedName SearchName |
Finds an automatically bound uniform buffer matching the HashedName if one exists, or returns an unbound parameter. | Shader.h | |
const FSHAHash & GetVertexFactoryHash() |
Shader.h | ||
FVertexFactoryType * GetVertexFactoryType
(
const FShaderMapPointerTable& InPointerTable |
Shader.h | ||
FVertexFactoryType * GetVertexFactoryType
(
const FPointerTableBase* InPointerTable |
Shader.h | ||
bool IsFrozen() |
Shader.h | ||
void SaveShaderStableKeys
(
const FShaderMapPointerTable& InPtrTable, |
Shader.h | ||
void SetNumInstructions
(
uint32 Value |
Shader.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Can be overridden by FShader subclasses to set a custom job priority (EShaderCompileJobPriority) or EShaderCompileJobPriority::None to ignore custom priority. | Shader.h | ||
static ERayTracingPayloadType GetRayTracingPayloadType
(
const int32 PermutationId |
Can be overriden by FShader subclasses to specify which raytracing payload should be used. | Shader.h | |
static const FShaderParametersMetadata * GetRootParametersMetadata() |
Returns the meta data for the root shader parameter struct. | Shader.h | |
static const FShaderBindingLayout * GetShaderBindingLayout
(
const FShaderPermutationParameters& |
Get shader binding layout used by the shader | Shader.h | |
static void InternalDestroy
(
void* Object, |
Shader.h | ||
static void InternalInitializeBases
(
FTypeLayoutDesc& TypeDesc |
Shader.h | ||
static void ModifyCompilationEnvironment
(
const FShaderPermutationParameters&, |
Can be overridden by FShader subclasses to modify their compile environment just before compilation occurs. | Shader.h | |
static bool ShouldCompilePermutation
(
const FShaderPermutationParameters& |
Can be overridden by FShader subclasses to determine whether a specific permutation should be compiled. | Shader.h | |
static EShaderPermutationPrecacheRequest ShouldPrecachePermutation
(
const FShaderPermutationParameters& Parameters |
Can be overridden by FShader subclasses to determine whether a specific permutation should be precached. | Shader.h | |
static FTypeLayoutDesc & StaticGetTypeLayout() |
Shader.h | ||
static bool ValidateCompiledResult
(
EShaderPlatform InPlatform, |
Can be overridden by FShader subclasses to determine whether compilation is valid. | Shader.h |