UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MeshMaterialShaderType.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3/*=============================================================================
4 MeshMaterialShader.h: Mesh material shader definitions.
5=============================================================================*/
6
7#pragma once
8
9#include "CoreMinimal.h"
10#include "Shader.h"
11#include "MaterialShaderType.h"
12
13class FMaterial;
21
26{
27public:
45
46 IMPLEMENT_SHADER_TYPE_CONSTRUCTOR(FMeshMaterialShaderType, EShaderTypeForDynamicCast::MeshMaterial, TEXT("mesh material shader"));
47
48#if WITH_EDITOR
58 int32 PermutationId,
60 EShaderPermutationFlags PermutationFlags,
61 const FMaterial* Material,
62 const FMaterialShaderMapId& ShaderMapId,
64 const FVertexFactoryType* VertexFactoryType,
66 const FString& DebugGroupName,
67 const TCHAR* DebugDescription,
68 const TCHAR* DebugExtension
69 ) const;
70
74 int32 PermutationId,
76 EShaderPermutationFlags PermutationFlags,
77 const FMaterial* Material,
78 const FMaterialShaderMapId& ShaderMapId,
80 const FVertexFactoryType* VertexFactoryType,
81 const FShaderPipelineType* ShaderPipeline,
83 const FString& DebugGroupName,
84 const TCHAR* DebugDescription,
85 const TCHAR* DebugExtension
86 );
87
94 const FUniformExpressionSet& UniformExpressionSet,
95 const FSHAHash& MaterialShaderMapHash,
97 const FShaderPipelineType* ShaderPipeline,
98 const FString& InDebugDescription
99 ) const;
100#endif // WITH_EDITOR
101
109 bool ShouldCompilePermutation(EShaderPlatform Platform, const FMaterialShaderParameters& MaterialParameters, const FVertexFactoryType* VertexFactoryType, int32 PermutationId, EShaderPermutationFlags Flags) const;
110
111 static bool ShouldCompileVertexFactoryPermutation(EShaderPlatform Platform, const FMaterialShaderParameters& MaterialParameters, const FVertexFactoryType* VertexFactoryType, const FShaderType* ShaderType, EShaderPermutationFlags Flags);
112
114
116
117#if WITH_EDITOR
123 void SetupCompileEnvironment(EShaderPlatform Platform, const FMaterialShaderParameters& MaterialParameters, const FVertexFactoryType* VertexFactoryType, int32 PermutationId, EShaderPermutationFlags PermutationFlags, FShaderCompilerEnvironment& Environment) const;
124#endif // WITH_EDITOR
125};
126
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EShaderPlatform
Definition RHIShaderPlatform.h:11
EShaderCompileJobPriority
Definition ShaderCore.h:803
EShaderPermutationFlags
Definition ShaderPermutation.h:19
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition MaterialShared.h:1194
Definition MaterialShaderType.h:95
Definition MaterialShared.h:2058
Definition MeshMaterialShaderType.h:26
static bool ShouldCompilePipeline(const FShaderPipelineType *ShaderPipelineType, EShaderPlatform Platform, const FMaterialShaderParameters &MaterialParameters, const FVertexFactoryType *VertexFactoryType, EShaderPermutationFlags Flags)
Definition MeshMaterialShader.cpp:192
bool ShouldCompilePermutation(EShaderPlatform Platform, const FMaterialShaderParameters &MaterialParameters, const FVertexFactoryType *VertexFactoryType, int32 PermutationId, EShaderPermutationFlags Flags) const
Definition MeshMaterialShader.cpp:182
IMPLEMENT_SHADER_TYPE_CONSTRUCTOR(FMeshMaterialShaderType, EShaderTypeForDynamicCast::MeshMaterial, TEXT("mesh material shader"))
static bool ShouldCompileVertexFactoryPermutation(EShaderPlatform Platform, const FMaterialShaderParameters &MaterialParameters, const FVertexFactoryType *VertexFactoryType, const FShaderType *ShaderType, EShaderPermutationFlags Flags)
Definition MeshMaterialShader.cpp:187
static bool ShouldCompileVertexFactoryPipeline(const FShaderPipelineType *ShaderPipelineType, EShaderPlatform Platform, const FMaterialShaderParameters &MaterialParameters, const FVertexFactoryType *VertexFactoryType, EShaderPermutationFlags Flags)
Definition MeshMaterialShader.cpp:206
Definition MeshMaterialShader.h:68
Definition SecureHash.h:226
Definition ShaderCompilerJobTypes.h:152
Definition ShaderCompilerJobTypes.h:331
Definition Shader.h:1931
Definition Shader.h:1238
Definition Shader.h:829
Definition MaterialShared.h:666
Definition VertexFactory.h:314
Definition Array.h:670
Definition RefCounting.h:454
Definition MaterialShared.h:1181
Definition MaterialShaderType.h:98
Definition MeshMaterialShaderType.h:29
const FVertexFactoryType * VertexFactoryType
Definition MeshMaterialShaderType.h:30
CompiledShaderInitializerType(const FShaderType *InType, int32 PermutationId, const FShaderCompilerOutput &CompilerOutput, const FUniformExpressionSet &InUniformExpressionSet, const FSHAHash &InMaterialShaderMapHash, const FString &InDebugDescription, const FShaderPipelineType *InShaderPipeline, const FVertexFactoryType *InVertexFactoryType)
Definition MeshMaterialShaderType.h:31
int32 PermutationId
Definition Shader.h:1623
Definition ShaderCore.h:544
Definition ShaderCompilerCore.h:491
Definition ShaderCore.h:731