engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 成员函数 | 所有成员列表
FMaterialResource类 参考

Implementation of the FMaterial interface for a UMaterial or UMaterialInstance. 更多...

#include <MaterialShared.h>

+ 类 FMaterialResource 继承关系图:

Public 成员函数

virtual ENGINE_API bool GetAllowDevelopmentShaderCompile () const override
 Returns true if this material is allowed to make development shaders via the global CVar CompileShadersForDevelopment.
 
virtual ENGINE_API FGuid GetMaterialId () const override
 Gets the Guid that represents this material.
 
virtual ENGINE_API FString GetMaterialUsageDescription () const override
 Returns a string that describes the material's usage for debugging purposes.
 
virtual ENGINE_API bool IsPersistent () const override
 Should shaders compiled for this material be saved to disk?
 
virtual ENGINE_API void LegacySerialize (FArchive &Ar) override
 Serializes the material.
 
- Public 成员函数 继承自 FMaterial
ENGINE_API bool CacheShaders (const FMaterialShaderMapId &ShaderMapId, EShaderPlatform Platform, const ITargetPlatform *TargetPlatform=nullptr)
 Caches the material shaders for the given static parameter set and platform. 更多...
 
ENGINE_API bool CacheShaders (EShaderPlatform Platform, const ITargetPlatform *TargetPlatform=nullptr)
 Caches the material shaders for this material on the given platform. 更多...
 
void DiscardShaderMap ()
 Discards loaded shader maps if the application can't render
 
 FMaterial ()
 Minimal initialization constructor.
 
virtual bool GetAllowDevelopmentShaderCompile () const
 Returns true if this material is allowed to make development shaders via the global CVar CompileShadersForDevelopment.
 
ENGINE_API bool GetMaterialExpressionSource (FString &OutSource)
 Get user source code for the material, with a list of code snippets to highlight representing the code for each MaterialExpression 更多...
 
virtual EMaterialShaderMapUsage::Type GetMaterialShaderMapUsage () const
 Returns which shadermap this material is bound to.
 
virtual FString GetMaterialUsageDescription () const =0
 Returns a string that describes the material's usage for debugging purposes.
 
ENGINE_API uint8 GetRuntimeVirtualTextureOutputAttibuteMask_RenderThread () const
 Get the runtime virtual texture output attribute mask for the material.
 
template<typename ShaderType >
TShaderRef< ShaderType > GetShader (FVertexFactoryType *VertexFactoryType, const typename ShaderType::FPermutationDomain &PermutationVector, bool bFatalIfMissing=true) const
 Finds the shader matching the template type and the passed in vertex factory, asserts if not found. 更多...
 
ENGINE_API bool HasValidGameThreadShaderMap () const
 Checks if there is a valid GameThreadShaderMap, that is, the material can be rendered as intended. 更多...
 
virtual bool IsPersistent () const =0
 Should shaders compiled for this material be saved to disk?
 
virtual ENGINE_API void LegacySerialize (FArchive &Ar)
 Serializes the material.
 
ENGINE_API bool MaterialMayModifyMeshPosition () const
 Note: This function is only intended for use in deciding whether or not shader permutations are required before material translation occurs.
 
ENGINE_API bool MaterialModifiesMeshPosition_RenderThread () const
 Does the material modify the mesh position.
 
ENGINE_API bool MaterialUsesDistanceCullFade_GameThread () const
 Does the material use a distance cull fade.
 
ENGINE_API bool MaterialUsesPixelDepthOffset () const
 Does the material use a pixel depth offset.
 
ENGINE_API bool MaterialUsesSceneDepthLookup_RenderThread () const
 Does the material use a SceneDepth lookup.
 
void RegisterInlineShaderMap (bool bLoadedByCookedMaterial)
 Serializes the shader map inline in this material, including any shader dependencies.
 
void ReleaseShaderMap ()
 Releases this material's shader map. 更多...
 
void SerializeInlineShaderMap (FArchive &Ar)
 Serializes the shader map inline in this material, including any shader dependencies.
 
ENGINE_API void SetRenderingThreadShaderMap (const TRefCountPtr< FMaterialShaderMap > &InMaterialShaderMap)
 Note: SetGameThreadShaderMap must also be called with the same value, but from the game thread.
 
virtual void SetupExtaCompilationSettings (const EShaderPlatform Platform, FExtraShaderCompilerSettings &Settings) const
 call during shader compilation jobs setup to fill additional settings that may be required by classes who inherit from this
 
virtual ENGINE_API bool ShouldCache (EShaderPlatform Platform, const FShaderType *ShaderType, const FVertexFactoryType *VertexFactoryType) const
 Should the shader for this material with the given platform, shader type and vertex factory type combination be compiled 更多...
 
bool ShouldCastDynamicShadows () const
 Returns whether this material should be considered for casting dynamic shadows.
 
ENGINE_API bool UsesCustomDepthStencil_GameThread () const
 Does the material use CustomDepth or CustomStencil lookup
 
virtual ENGINE_API ~FMaterial ()
 Destructor
 

Protected 成员函数

virtual ENGINE_API int32 CompilePropertyAndSetMaterialProperty (EMaterialProperty Property, class FMaterialCompiler *Compiler, EShaderFrequency OverrideShaderFrequency, bool bUsePreviousFrameTime) const override
 Entry point for compiling a specific material property. 更多...
 
virtual ENGINE_API FString GetBaseMaterialPathName () const override
 Useful for debugging.
 
- Protected 成员函数 继承自 FMaterial
virtual int32 CompilePropertyAndSetMaterialProperty (EMaterialProperty Property, class FMaterialCompiler *Compiler, EShaderFrequency OverrideShaderFrequency=SF_NumFrequencies, bool bUsePreviousFrameTime=false) const =0
 Entry point for compiling a specific material property. 更多...
 
virtual FString GetBaseMaterialPathName () const
 Useful for debugging.
 
ENGINE_API void GetDependentShaderAndVFTypes (EShaderPlatform Platform, TArray< FShaderType * > &OutShaderTypes, TArray< const FShaderPipelineType * > &OutShaderPipelineTypes, TArray< FVertexFactoryType * > &OutVFTypes) const
 Produces arrays of any shader and vertex factory type that this material is dependent on.
 
virtual FGuid GetMaterialId () const =0
 Gets the Guid that represents this material.
 
virtual EMaterialShaderMapUsage::Type GetShaderMapUsage () const
 Gets the shader map usage of the material, which will be included in the DDC key. 更多...
 

详细描述

Implementation of the FMaterial interface for a UMaterial or UMaterialInstance.

成员函数说明

◆ CompilePropertyAndSetMaterialProperty()

virtual ENGINE_API int32 FMaterialResource::CompilePropertyAndSetMaterialProperty ( EMaterialProperty  Property,
class FMaterialCompiler *  Compiler,
EShaderFrequency  OverrideShaderFrequency,
bool  bUsePreviousFrameTime 
) const
overrideprotectedvirtual

Entry point for compiling a specific material property.

This must call SetMaterialProperty.

实现了 FMaterial.


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