engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | 友元 | 所有成员列表
FMaterialShaderMap类 参考

The set of material shaders for a single material. 更多...

#include <MaterialShared.h>

+ 类 FMaterialShaderMap 继承关系图:

Public 成员函数

TArray< uint8 > * BackupShadersToMemory ()
 Backs up any FShaders in this shader map to memory through serialization and clears FShader references.
 
void Compile (FMaterial *Material, const FMaterialShaderMapId &ShaderMapId, TRefCountPtr< FShaderCompilerEnvironment > MaterialEnvironment, const FMaterialCompilationOutput &InMaterialCompilationOutput, EShaderPlatform Platform, bool bSynchronousCompile)
 Compiles the shaders for a material and caches them in this shader map. 更多...
 
void FlushShadersByShaderPipelineType (const FShaderPipelineType *ShaderPipelineType)
 Removes all entries in the cache with exceptions based on a shader pipeline type 更多...
 
void FlushShadersByShaderType (const FShaderType *ShaderType)
 Removes all entries in the cache with exceptions based on a shader type 更多...
 
void FlushShadersByVertexFactoryType (const FVertexFactoryType *VertexFactoryType)
 Removes all entries in the cache with exceptions based on a vertex factory type 更多...
 
ENGINE_API void GetShaderList (TMap< FHashedName, TShaderRef< FShader > > &OutShaders) const
 Builds a list of the shaders in a shader map. 更多...
 
ENGINE_API void GetShaderList (TMap< FShaderId, TShaderRef< FShader > > &OutShaders) const
 Builds a list of the shaders in a shader map.
 
ENGINE_API uint32 GetShaderNum () const
 Number of Shaders in Shadermap
 
ENGINE_API void GetShaderPipelineList (TArray< FShaderPipelineRef > &OutShaderPipelines) const
 Builds a list of the shader pipelines in a shader map.
 
bool IsComplete (const FMaterial *Material, bool bSilent)
 Checks whether the material shader map is missing any shader types necessary for the given material. 更多...
 
void Register (EShaderPlatform InShaderPlatform)
 Registers a material shader map in the global map so it can be used by materials.
 
void RestoreShadersFromMemory (const TArray< uint8 > &ShaderData)
 Recreates FShaders from the passed in memory, handling shader key changes.
 
bool Serialize (FArchive &Ar, bool bInlineShaderResources=true, bool bLoadedByCookedMaterial=false, bool bInlineShaderCode=false)
 Serializes the shader map.
 
bool TryToAddToExistingCompilationTask (FMaterial *Material)
 Checks to see if the shader map is already being compiled for another material, and if so adds the specified material to the list to be applied to once the compile finishes. 更多...
 

静态 Public 成员函数

static TRefCountPtr< FMaterialShaderMap > FindId (const FMaterialShaderMapId &ShaderMapId, EShaderPlatform Platform)
 Finds the shader map for a material. 更多...
 
static const FMaterialShaderMap * GetShaderMapBeingCompiled (const FMaterial *Material)
 Finds a shader map currently being compiled that was enqueued for the given material.
 
static void RemovePendingMaterial (FMaterial *Material)
 Removes a material from ShaderMapsBeingCompiled.
 
static ENGINE_API void SaveForRemoteRecompile (FArchive &Ar, const TMap< FString, TArray< TRefCountPtr< FMaterialShaderMap > > > &CompiledShaderMaps)
 Serializes a shader map to an archive (used with recompiling shaders for a remote console)
 

友元

ENGINE_API void DumpMaterialStats (EShaderPlatform Platform)
 Dump material stats for a given platform. 更多...
 
class FShaderCompilingManager
 

详细描述

The set of material shaders for a single material.

成员函数说明

◆ Compile()

void FMaterialShaderMap::Compile ( FMaterial *  Material,
const FMaterialShaderMapId &  ShaderMapId,
TRefCountPtr< FShaderCompilerEnvironment >  MaterialEnvironment,
const FMaterialCompilationOutput &  InMaterialCompilationOutput,
EShaderPlatform  Platform,
bool  bSynchronousCompile 
)

Compiles the shaders for a material and caches them in this shader map.

参数
Material- The material to compile shaders for.
ShaderMapId- the set of static parameters to compile for
Platform- The platform to compile to

◆ FindId()

static TRefCountPtr< FMaterialShaderMap > FMaterialShaderMap::FindId ( const FMaterialShaderMapId &  ShaderMapId,
EShaderPlatform  Platform 
)
static

Finds the shader map for a material.

参数
ShaderMapId- The static parameter set and other properties identifying the shader map
Platform- The platform to lookup for
返回
NULL if no cached shader map was found.

◆ FlushShadersByShaderPipelineType()

void FMaterialShaderMap::FlushShadersByShaderPipelineType ( const FShaderPipelineType *  ShaderPipelineType)

Removes all entries in the cache with exceptions based on a shader pipeline type

参数
ShaderPipelineType- The shader pipeline type to flush

◆ FlushShadersByShaderType()

void FMaterialShaderMap::FlushShadersByShaderType ( const FShaderType *  ShaderType)

Removes all entries in the cache with exceptions based on a shader type

参数
ShaderType- The shader type to flush

◆ FlushShadersByVertexFactoryType()

void FMaterialShaderMap::FlushShadersByVertexFactoryType ( const FVertexFactoryType *  VertexFactoryType)

Removes all entries in the cache with exceptions based on a vertex factory type

参数
ShaderType- The shader type to flush

◆ GetShaderList()

ENGINE_API void FMaterialShaderMap::GetShaderList ( TMap< FHashedName, TShaderRef< FShader > > &  OutShaders) const

Builds a list of the shaders in a shader map.

Key is FShaderType::TypeName

◆ IsComplete()

bool FMaterialShaderMap::IsComplete ( const FMaterial *  Material,
bool  bSilent 
)

Checks whether the material shader map is missing any shader types necessary for the given material.

参数
Material- The material which is checked.
返回
True if the shader map has all of the shader types necessary.

◆ TryToAddToExistingCompilationTask()

bool FMaterialShaderMap::TryToAddToExistingCompilationTask ( FMaterial *  Material)

Checks to see if the shader map is already being compiled for another material, and if so adds the specified material to the list to be applied to once the compile finishes.

参数
Material- The material we also wish to apply the compiled shader map to.
返回
True if the shader map was being compiled and we added Material to the list to be applied.

友元及相关函数文档

◆ DumpMaterialStats

ENGINE_API void DumpMaterialStats ( EShaderPlatform  Platform)
friend

Dump material stats for a given platform.

参数
PlatformPlatform to dump stats for.

该类的文档由以下文件生成: