![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <Shader.h>
Inheritance diagram for FShader:Public Types | |
| using | FPermutationDomain = FShaderPermutationNone |
| using | FPermutationParameters = FShaderPermutationParameters |
| using | CompiledShaderInitializerType = FShaderCompiledShaderInitializerType |
| using | ShaderMetaType = FShaderType |
| using | ShaderStatKeyType = FMemoryImageName |
| using | FShaderStatisticMap = TMemoryImageMap< ShaderStatKeyType, FShaderStatVariant > |
Static Public Member Functions | |
| static void | ModifyCompilationEnvironment (const FShaderPermutationParameters &, FShaderCompilerEnvironment &) |
| static const FShaderBindingLayout * | GetShaderBindingLayout (const FShaderPermutationParameters &) |
| static bool | ShouldCompilePermutation (const FShaderPermutationParameters &) |
| static EShaderPermutationPrecacheRequest | ShouldPrecachePermutation (const FShaderPermutationParameters &Parameters) |
| static bool | ValidateCompiledResult (EShaderPlatform InPlatform, const FShaderParameterMap &InParameterMap, TArray< FString > &OutError) |
| static EShaderCompileJobPriority | GetOverrideJobPriority () |
| static ERayTracingPayloadType | GetRayTracingPayloadType (const int32 PermutationId) |
| static const FShaderParametersMetadata * | GetRootParametersMetadata () |
Protected Member Functions | |
| LAYOUT_FIELD (TMemoryImageArray< FHashedName >, UniformBufferParameterStructs) | |
| LAYOUT_FIELD (TMemoryImageArray< FShaderUniformBufferParameter >, UniformBufferParameters) | |
| LAYOUT_FIELD_EDITORONLY (FSHAHash, OutputHash) | |
| LAYOUT_FIELD_EDITORONLY (FSHAHash, VFSourceHash) | |
| LAYOUT_FIELD_EDITORONLY (FSHAHash, SourceHash) | |
Friends | |
| class | FShaderType |
A compiled shader and its parameter bindings.
| using FShader::ShaderMetaType = FShaderType |
| FShader::FShader | ( | ) |
Used to construct a shader for deserialization. This still needs to initialize members to safe values since FShaderType::GenerateSerializationHistory uses this constructor.
| FShader::FShader | ( | const CompiledShaderInitializerType & | Initializer | ) |
Construct a shader from shader compiler output.
| FShader::~FShader | ( | ) |
| void FShader::DumpDebugInfo | ( | const FShaderMapPointerTable & | InPtrTable | ) |
| void FShader::Finalize | ( | const FShaderMapResourceCode * | Code | ) |
| const FShaderParametersMetadata * FShader::FindAutomaticallyBoundUniformBufferStruct | ( | int32 | BaseIndex | ) | const |
|
inline |
|
inline |
| const FSHAHash & FShader::GetHash | ( | ) | const |
Returns the hash of the shader file that this shader was compiled with.
|
inline |
|
inline |
| const FSHAHash & FShader::GetOutputHash | ( | ) | const |
|
inlinestatic |
Can be overridden by FShader subclasses to set a custom job priority (EShaderCompileJobPriority) or EShaderCompileJobPriority::None to ignore custom priority. This can only increase priority.
|
inlinestatic |
Can be overriden by FShader subclasses to specify which raytracing payload should be used. This method is only called for raytracing shaders.
|
inline |
|
inlinestatic |
Returns the meta data for the root shader parameter struct.
|
inlinestatic |
Get shader binding layout used by the shader
|
inline |
|
inline |
Returns an identifier suitable for deterministic sorting of shaders between sessions.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Finds an automatically bound uniform buffer matching the given uniform buffer type if one exists, or returns an unbound parameter.
|
inline |
Finds an automatically bound uniform buffer matching the HashedName if one exists, or returns an unbound parameter.
|
inline |
Finds an automatically bound uniform buffer matching the given uniform buffer struct if one exists, or returns an unbound parameter.
| const FSHAHash & FShader::GetVertexFactoryHash | ( | ) | const |
|
inline |
|
inline |
|
inline |
| FShader::LAYOUT_FIELD | ( | FShaderParameterBindings | , |
| Bindings | |||
| ) |
| FShader::LAYOUT_FIELD | ( | FShaderParameterMapInfo | , |
| ParameterMapInfo | |||
| ) |
|
protected |
|
protected |
|
protected |
Hash of the compiled output from this shader and the resulting parameter map. This is used to find a matching resource.
|
protected |
Hash of this shader's source files generated at compile time, and stored to allow creating an FShaderId.
|
protected |
Vertex factory source hash, stored so that an FShaderId can be constructed from this shader.
|
inlinestatic |
Can be overridden by FShader subclasses to modify their compile environment just before compilation occurs.
|
inlinestatic |
Can be overridden by FShader subclasses to determine whether a specific permutation should be compiled.
|
inlinestatic |
Can be overridden by FShader subclasses to determine whether a specific permutation should be precached.
|
inlinestatic |
Can be overridden by FShader subclasses to determine whether compilation is valid.
|
friend |