A shader meta type for material-linked shaders which use a vertex factory. 更多...
#include <MeshMaterialShaderType.h>
类 FMeshMaterialShaderType 继承关系图:Public 成员函数 | |
| class FShaderCompileJob * | BeginCompileShader (uint32 ShaderMapId, int32 PermutationId, EShaderPlatform Platform, const FMaterial *Material, FShaderCompilerEnvironment *MaterialEnvironment, FVertexFactoryType *VertexFactoryType, const FShaderPipelineType *ShaderPipeline, TArray< TSharedRef< FShaderCommonCompileJob, ESPMode::ThreadSafe > > &NewJobs, FString DebugDescription, FString DebugExtension) |
| Enqueues a compilation for a new shader of this type. 更多... | |
| FShader * | FinishCompileShader (const FUniformExpressionSet &UniformExpressionSet, const FSHAHash &MaterialShaderMapHash, const FShaderCompileJob &CurrentJob, const FShaderPipelineType *ShaderPipeline, const FString &InDebugDescription) |
| Either creates a new instance of this type or returns an equivalent existing shader. 更多... | |
| bool | ShouldCompilePermutation (EShaderPlatform Platform, const FMaterialShaderParameters &MaterialParameters, const FVertexFactoryType *VertexFactoryType, int32 PermutationId) const |
| Checks if the shader type should be cached for a particular platform, material, and vertex factory type. 更多... | |
Public 成员函数 继承自 FShaderType | |
| void | AddReferencedUniformBufferIncludes (FShaderCompilerEnvironment &OutEnvironment, FString &OutSourceFilePrefix, EShaderPlatform Platform) |
| Adds include statements for uniform buffers that this shader type references, and builds a prefix for the shader file with the include statements. | |
| FShader * | ConstructForDeserialization () const |
| Constructs a new instance of the shader type for deserialization. | |
| FShaderType (EShaderTypeForDynamicCast InShaderTypeForDynamicCast, FTypeLayoutDesc &InTypeLayout, const TCHAR *InName, const TCHAR *InSourceFilename, const TCHAR *InFunctionName, uint32 InFrequency, int32 TotalPermutationCount, ConstructSerializedType InConstructSerializedRef, ConstructCompiledType InConstructCompiledRef, ModifyCompilationEnvironmentType InModifyCompilationEnvironmentRef, ShouldCompilePermutationType InShouldCompilePermutationRef, ValidateCompiledResultType InValidateCompiledResultRef, uint32 InTypeSize, const FShaderParametersMetadata *InRootParametersMetadata) | |
| Minimal initialization constructor. | |
| const FShaderParametersMetadata * | GetRootParametersMetadata () const |
| Returns the meta data for the root shader parameter struct. | |
| const FSHAHash & | GetSourceHash (EShaderPlatform ShaderPlatform) const |
| Calculates a Hash based on this shader type's source code and includes | |
| bool | ValidateCompiledResult (EShaderPlatform Platform, const FShaderParameterMap &ParameterMap, TArray< FString > &OutError) const |
| Checks if the shader type should pass compilation for a particular set of parameters. 更多... | |
Protected 成员函数 | |
| void | SetupCompileEnvironment (EShaderPlatform Platform, const FMaterialShaderParameters &MaterialParameters, const FVertexFactoryType *VertexFactoryType, int32 PermutationId, FShaderCompilerEnvironment &Environment) |
| Sets up the environment used to compile an instance of this shader type. 更多... | |
额外继承的成员函数 | |
静态 Public 成员函数 继承自 FShaderType | |
| static TMap< FHashedName, FShaderType * > & | GetNameToTypeMap () |
| static TLinkedList< FShaderType * > *& | GetTypeList () |
| static void | Initialize (const TMap< FString, TArray< const TCHAR * > > &ShaderFileToUniformBufferVariables) |
| Initialize FShaderType static members, this must be called before any shader types are created. | |
| static void | Uninitialize () |
| Uninitializes FShaderType cached data. | |
Protected 属性 继承自 FShaderType | |
| bool | bCachedUniformBufferStructDeclarations |
| Tracks what platforms ReferencedUniformBufferStructsCache has had declarations cached for. | |
| TMap< const TCHAR *, FCachedUniformBufferDeclaration > | ReferencedUniformBufferStructsCache |
| Cache of referenced uniform buffer includes. 更多... | |
A shader meta type for material-linked shaders which use a vertex factory.
| class FShaderCompileJob * FMeshMaterialShaderType::BeginCompileShader | ( | uint32 | ShaderMapId, |
| int32 | PermutationId, | ||
| EShaderPlatform | Platform, | ||
| const FMaterial * | Material, | ||
| FShaderCompilerEnvironment * | MaterialEnvironment, | ||
| FVertexFactoryType * | VertexFactoryType, | ||
| const FShaderPipelineType * | ShaderPipeline, | ||
| TArray< TSharedRef< FShaderCommonCompileJob, ESPMode::ThreadSafe > > & | NewJobs, | ||
| FString | DebugDescription, | ||
| FString | DebugExtension | ||
| ) |
Enqueues a compilation for a new shader of this type.
| Platform | - The platform to compile for. |
| Material | - The material to link the shader with. |
| VertexFactoryType | - The vertex factory to compile with. |
| FShader * FMeshMaterialShaderType::FinishCompileShader | ( | const FUniformExpressionSet & | UniformExpressionSet, |
| const FSHAHash & | MaterialShaderMapHash, | ||
| const FShaderCompileJob & | CurrentJob, | ||
| const FShaderPipelineType * | ShaderPipeline, | ||
| const FString & | InDebugDescription | ||
| ) |
Either creates a new instance of this type or returns an equivalent existing shader.
| Material | - The material to link the shader with. |
| CurrentJob | - Compile job that was enqueued by BeginCompileShader. |
|
protected |
Sets up the environment used to compile an instance of this shader type.
| Platform | - Platform to compile for. |
| Environment | - The shader compile environment that the function modifies. |
| bool FMeshMaterialShaderType::ShouldCompilePermutation | ( | EShaderPlatform | Platform, |
| const FMaterialShaderParameters & | MaterialParameters, | ||
| const FVertexFactoryType * | VertexFactoryType, | ||
| int32 | PermutationId | ||
| ) | const |
Checks if the shader type should be cached for a particular platform, material, and vertex factory type.
| Platform | - The platform to check. |
| Material | - The material to check. |
| VertexFactoryType | - The vertex factory type to check. |