Navigation
API > API/Runtime > API/Runtime/Engine
FMaterial serves 3 intertwined purposes: Represents a material to the material compilation process, and provides hooks for extensibility (CompileProperty, etc) Represents a material to the renderer, with functions to access material properties Stores a cached shader map, and other transient output from a compile, which is necessary with async shader compiling (when a material finishes async compilation, the shader map and compile errors need to be stored somewhere)
| Name | FMaterial |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/MaterialShared.h |
| Include Path | #include "MaterialShared.h" |
Syntax
class FMaterial
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMaterial() |
Minimal initialization constructor. | MaterialShared.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FMaterial() |
Destructor | MaterialShared.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| EditorLoadedMaterialResources | TSet< FMaterial * > | Tracks FMaterials without a corresponding UMaterialInterface in the editor, for example FExpressionPreviews. | MaterialShared.h |
| PrecachedPSORequestIDsCS | FCriticalSection | Shared critical section on PrecachedPSORequestIDs because contention should be very limited | MaterialShared.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| TransientOverrides | FUniformParameterOverrides | MaterialShared.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAllowPixelDepthOffset | uint32 | MaterialShared.h | ||
| bContainsInlineShaders | uint32 | Whether this material was loaded with shaders inlined. | MaterialShared.h | |
| bGameThreadShaderMapIsComplete | std::atomic< bool > | These are touched by different threads and need to be outside the bitfield above. | MaterialShared.h | |
| bLoadedCookedShaderMapId | uint32 | MaterialShared.h | ||
| bRenderingThreadShaderMapIsComplete | std::atomic< bool > | MaterialShared.h | ||
| bStencilDitheredLOD | uint32 | Whether tthis project uses stencil dither lod. | MaterialShared.h | |
| CacheShadersCompletion | TUniqueFunction< bool()> | MaterialShared.h | ||
| CacheShadersPending | TSharedPtr< FMaterialShaderMap::FAsyncLoadContext > | MaterialShared.h | ||
| CompileErrors | TArray< FString > | MaterialShared.h | ||
| DebugGroupName | FString | MaterialShared.h | ||
| ErrorExpressions | TArray< TObjectPtr< UMaterialExpression > > | List of material expressions which generated a compiler error during the last compile. | MaterialShared.h | |
| FeatureLevel | ERHIFeatureLevel::Type | Feature level that this material is representing. | MaterialShared.h | |
| GameThreadCompilingShaderMapId | uint32 | MaterialShared.h | ||
| GameThreadPendingCompilerEnvironment | TRefCountPtr< FSharedShaderCompilerEnvironment > | MaterialShared.h | ||
| GameThreadShaderMap | TRefCountPtr< FMaterialShaderMap > | Game thread tracked shader map, which is ref counted and manages shader map lifetime. | MaterialShared.h | |
| GameThreadShaderMapSubmittedPriority | EShaderCompileJobPriority | Used to prevent submitting the material more than once. | MaterialShared.h | |
| PrecachedPSORequestIDs | TArray< FMaterialPSOPrecacheRequestID > | MaterialPSO request IDs currently active for this material | MaterialShared.h | |
| QualityLevel | EMaterialQualityLevel::Type | TArray |
MaterialShared.h | |
| RenderingThreadCompilingShaderMapId | uint32 | MaterialShared.h | ||
| RenderingThreadPendingCompilerEnvironment | TRefCountPtr< FSharedShaderCompilerEnvironment > | MaterialShared.h | ||
| RenderingThreadShaderMap | TRefCountPtr< FMaterialShaderMap > | Shader map for this material resource which is accessible by the rendering thread. | MaterialShared.h | |
| RenderingThreadShaderMapSubmittedPriority | std::atomic< int8 > | Used to prevent submitting the material more than once during CacheMeshDrawCommands unless priority has been increased. | MaterialShared.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
uint32 AddRef() |
MaterialShared.h | ||
virtual void AddReferencedObjects
(
FReferenceCollector& Collector |
MaterialShared.h | ||
virtual bool AllowNegativeEmissiveColor() |
MaterialShared.h | ||
virtual bool AllowTranslucentLocalLightShadow() |
MaterialShared.h | ||
void AppendCompileStateDebugInfo
(
FStringBuilderBase& OutDebugInfo |
MaterialShared.h | ||
virtual void BeginAllowCachingStaticParameterValues() |
MaterialShared.h | ||
void BeginCacheShaders
(
const FMaterialShaderMapId& ShaderMapId, |
Begins caching the material shaders for the given static parameter set and platform. | MaterialShared.h | |
void BeginCacheShaders
(
EShaderPlatform Platform, |
Begins caching the material shaders for the given static parameter set and platform. | MaterialShared.h | |
void CacheGivenTypes
(
EShaderPlatform ShaderPlatform, |
Submits local compile jobs for the exact given shader types and vertex factory type combination. | MaterialShared.h | |
bool CacheShaders
(
EShaderPlatform Platform, |
Caches the material shaders for this material on the given platform. | MaterialShared.h | |
bool CacheShaders
(
const FMaterialShaderMapId& ShaderMapId, |
Caches the material shaders for the given static parameter set and platform. | MaterialShared.h | |
void CancelCompilation() |
Cancels all outstanding compilation jobs for this material. | MaterialShared.h | |
virtual bool CastsRayTracedShadows() |
MaterialShared.h | ||
void ClearPrecachedPSORequestIDs() |
Clear all cached PSO data because manager has been reset | MaterialShared.h | |
FGraphEventArray CollectPSOs
(
ERHIFeatureLevel::Type InFeatureLevel, |
Collect all possible PSO's which can be used with this material for given parameters - PSOs will be async precached | MaterialShared.h | |
virtual bool ComputeFogPerPixel() |
MaterialShared.h | ||
void DiscardShaderMap() |
Discards loaded shader maps if the application can't render | MaterialShared.h | |
void DumpDebugInfo
(
FOutputDevice& OutputDevice |
MaterialShared.h | ||
virtual void EndAllowCachingStaticParameterValues() |
MaterialShared.h | ||
virtual void FeedbackMaterialLayersInstancedGraphFromCompilation
(
const FMaterialLayersFunctions* InLayers |
MaterialShared.h | ||
bool FinishCacheShaders() |
Finishes any pending material caching. | MaterialShared.h | |
void FinishCompilation () |
Blocks until compilation has completed. Returns immediately if a compilation is not outstanding. | MaterialShared.h | |
virtual void GatherCustomOutputExpressions
(
TArray< class UMaterialExpressionCustomOutput* >& OutCustomOutputs |
Gather any UMaterialExpressionCustomOutput expressions they can be compiled in turn | MaterialShared.h | |
virtual void GatherExpressionsForCustomInterpolators
(
TArray< class UMaterialExpression* >& OutExpressions |
Gather any UMaterialExpressionCustomOutput expressions in the material and referenced function calls | MaterialShared.h | |
virtual bool GetAllowDevelopmentShaderCompile() |
Returns true if this material is allowed to make development shaders via the global CVar CompileShadersForDevelopment. | MaterialShared.h | |
virtual FString GetAssetName() |
Similar to GetFriendlyName, but but avoids historical behavior of the former, returning the exact asset name for material instances instead of just the material. | MaterialShared.h | |
virtual FName GetAssetPath() |
Allows to associate the shader resources with the asset for load order. | MaterialShared.h | |
virtual int32 GetBlendableLocation() |
MaterialShared.h | ||
virtual bool GetBlendableOutputAlpha() |
MaterialShared.h | ||
virtual int32 GetBlendablePriority() |
MaterialShared.h | ||
enum EBlendMode GetBlendMode() |
MaterialShared.h | ||
const FMaterialCachedExpressionData & GetCachedExpressionData() |
MaterialShared.h | ||
bool GetCastDynamicShadowAsMasked() |
MaterialShared.h | ||
const TArray< FString > & GetCompileErrors() |
MaterialShared.h | ||
uint8 GetCustomDepthStencilUsageMask_GameThread() |
The material usage mask of CustomDepth and CustomStencil | MaterialShared.h | |
const FString & GetDebugGroupName() |
MaterialShared.h | ||
virtual bool GetDisablePreExposureScale() |
MaterialShared.h | ||
virtual FDisplacementFadeRange GetDisplacementFadeRange() |
MaterialShared.h | ||
virtual FDisplacementScaling GetDisplacementScaling() |
MaterialShared.h | ||
const TArray< UMaterialExpression * > & GetErrorExpressions() |
MaterialShared.h | ||
const FStaticFeatureLevel GetFeatureLevel() |
MaterialShared.h | ||
virtual bool GetForceCompatibleWithLightFunctionAtlas() |
MaterialShared.h | ||
virtual bool GetForwardBlendsSkyLightCubemaps() |
MaterialShared.h | ||
FString GetFriendlyName() |
MaterialShared.h | ||
virtual FString GetFullPath() |
MaterialShared.h | ||
FMaterialShaderMap * GetGameThreadShaderMap() |
MaterialShared.h | ||
const FGuid & GetLegacyId() |
MaterialShared.h | ||
virtual uint32 GetMaterialDecalResponse() |
MaterialShared.h | ||
EMaterialDomain GetMaterialDomain() |
MaterialShared.h | ||
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 | MaterialShared.h | |
virtual enum EMaterialFloatPrecisionMode GetMaterialFloatPrecisionMode() |
MaterialShared.h | ||
virtual UMaterialInterface * GetMaterialInterface() |
MaterialShared.h | ||
virtual const FMaterialLayersFunctions * GetMaterialLayers() |
MaterialShared.h | ||
TArray< FMaterialPSOPrecacheRequestID > GetMaterialPSOPrecacheRequestIDs() |
Collect all PSO request information already done for this material | MaterialShared.h | |
virtual EMaterialShaderMapUsage::Type GetMaterialShaderMapUsage() |
Returns which shadermap this material is bound to. | MaterialShared.h | |
virtual EMaterialTranslateValidationFlags GetMaterialTranslateValidationFlags() |
MaterialShared.h | ||
FString GetMaterialUsageDescription() |
Returns a string that describes the material's usage for debugging purposes. | MaterialShared.h | |
virtual int32 GetNeuralProfileId() |
MaterialShared.h | ||
virtual int32 GetNumCustomizedUVs() |
MaterialShared.h | ||
float GetOpacityMaskClipValue() |
MaterialShared.h | ||
FName GetOwnerFName() |
For tracking ownership data | MaterialShared.h | |
virtual EPixelDepthOffsetMode GetPixelDepthOffsetMode() |
MaterialShared.h | ||
virtual uint16 GetPreshaderGap() |
MaterialShared.h | ||
void GetPreshaderStats
(
uint32& TotalParameters, |
Returns summary statistics for preshaders | MaterialShared.h | |
EMaterialQualityLevel::Type GetQualityLevel() |
MaterialShared.h | ||
uint32 GetRefCount() |
MaterialShared.h | ||
TConstArrayView< TObjectPtr< UTextureCollection > > GetReferencedTextureCollections() |
MaterialShared.h | ||
TArrayView< const TObjectPtr< UObject > > GetReferencedTextures() |
MaterialShared.h | ||
virtual ERefractionCoverageMode GetRefractionCoverageMode() |
MaterialShared.h | ||
virtual float GetRefractionDepthBiasValue() |
MaterialShared.h | ||
virtual enum ERefractionMode GetRefractionMode() |
MaterialShared.h | ||
FMaterialShaderMap * GetRenderingThreadShaderMap() |
MaterialShared.h | ||
bool GetRootNodeOverridesDefaultRefraction() |
MaterialShared.h | ||
uint8 GetRuntimeVirtualTextureOutputAttibuteMask_GameThread() |
Get the runtime virtual texture output attribute mask for the material. | MaterialShared.h | |
uint8 GetRuntimeVirtualTextureOutputAttibuteMask_RenderThread() |
MaterialShared.h | ||
TShaderRef< ShaderType > GetShader
(
FVertexFactoryType* VertexFactoryType, |
Finds the shader matching the template type and the passed in vertex factory, asserts if not found. | MaterialShared.h | |
TShaderRef< ShaderType > GetShader
(
FVertexFactoryType* VertexFactoryType, |
MaterialShared.h | ||
virtual void GetShaderMapId
(
EShaderPlatform Platform, |
Material properties. | MaterialShared.h | |
FShaderPipelineRef GetShaderPipeline
(
FShaderPipelineType* ShaderPipelineType, |
MaterialShared.h | ||
| MaterialShared.h | |||
void GetShaderTypes
(
EShaderPlatform Platform, |
Gathers a list of shader types sorted by vertex factory types that should be cached for this material. | MaterialShared.h | |
void GetShaderTypesForLayout
(
EShaderPlatform Platform, |
MaterialShared.h | ||
FMaterialShadingModelField GetShadingModels() |
MaterialShared.h | ||
virtual EMaterialShadingRate GetShadingRate() |
MaterialShared.h | ||
virtual void GetStaticParameterSet
(
EShaderPlatform Platform, |
MaterialShared.h | ||
virtual uint32 GetStencilCompare() |
MaterialShared.h | ||
virtual uint32 GetStencilRefValue() |
MaterialShared.h | ||
virtual const FSubstrateCompilationConfig & GetSubstrateCompilationConfig() |
Get to the Substrate compilation config | MaterialShared.h | |
virtual float GetTranslucencyDirectionalLightingIntensity() |
MaterialShared.h | ||
virtual enum ETranslucencyLightingMode GetTranslucencyLightingMode() |
MaterialShared.h | ||
virtual float GetTranslucentBackscatteringExponent() |
MaterialShared.h | ||
virtual float GetTranslucentDirectionalLightShadowQuality() |
MaterialShared.h | ||
virtual float GetTranslucentLocalLightShadowQuality() |
MaterialShared.h | ||
virtual FLinearColor GetTranslucentMultipleScatteringExtinction() |
MaterialShared.h | ||
virtual float GetTranslucentSelfShadowDensityScale() |
MaterialShared.h | ||
virtual float GetTranslucentSelfShadowSecondDensityScale() |
MaterialShared.h | ||
virtual float GetTranslucentSelfShadowSecondOpacity() |
MaterialShared.h | ||
virtual float GetTranslucentShadowDensityScale() |
MaterialShared.h | ||
virtual float GetTranslucentShadowStartOffset() |
MaterialShared.h | ||
TArrayView< const FMaterialTextureParameterInfo > GetUniform2DArrayTextureExpressions() |
MaterialShared.h | ||
TArrayView< const FMaterialTextureParameterInfo > GetUniform2DTextureExpressions() |
MaterialShared.h | ||
TArrayView< const FMaterialTextureParameterInfo > GetUniformCubeTextureExpressions() |
MaterialShared.h | ||
const FUniformExpressionSet & GetUniformExpressions() |
Accessors. | MaterialShared.h | |
TArrayView< const FMaterialNumericParameterInfo > GetUniformNumericParameterExpressions() |
MaterialShared.h | ||
TArrayView< const FMaterialTextureParameterInfo > GetUniformSparseVolumeTextureExpressions() |
MaterialShared.h | ||
TConstArrayView< FMaterialTextureCollectionParameterInfo > GetUniformTextureCollectionExpressions() |
MaterialShared.h | ||
TArrayView< const FMaterialTextureParameterInfo > GetUniformTextureExpressions
(
EMaterialTextureParameterType Type |
MaterialShared.h | ||
TArrayView< const FMaterialTextureParameterInfo > GetUniformVirtualTextureExpressions() |
MaterialShared.h | ||
TArrayView< const FMaterialTextureParameterInfo > GetUniformVolumeTextureExpressions() |
MaterialShared.h | ||
FString GetUniqueAssetName
(
EShaderPlatform Platform, |
Similar to GetFriendlyName, but appends a hash of shader map ID portion of the DDC key (excluding source file hashes) to differentiate materials/material instances that would collide when considering the base material name alone (this name is used when creating debug output paths for disambiguation). | MaterialShared.h | |
bool GetUsesDynamicParameter() |
MaterialShared.h | ||
virtual bool HasAmbientOcclusionConnected() |
MaterialShared.h | ||
virtual bool HasAnisotropyConnected() |
MaterialShared.h | ||
virtual bool HasBaseColorConnected() |
MaterialShared.h | ||
virtual bool HasDisplacementConnected() |
MaterialShared.h | ||
virtual bool HasEmissiveColorConnected() |
MaterialShared.h | ||
virtual bool HasFirstPersonOutput() |
MaterialShared.h | ||
virtual bool HasMaterialPropertyConnected
(
EMaterialProperty In |
MaterialShared.h | ||
virtual bool HasMetallicConnected() |
MaterialShared.h | ||
virtual bool HasNormalConnected() |
MaterialShared.h | ||
virtual bool HasPerInstanceCustomData() |
MaterialShared.h | ||
virtual bool HasPerInstanceRandom() |
MaterialShared.h | ||
virtual bool HasPixelAnimation() |
MaterialShared.h | ||
virtual bool HasPixelDepthOffsetConnected() |
MaterialShared.h | ||
virtual bool HasRenderTracePhysicalMaterialOutputs() |
MaterialShared.h | ||
virtual bool HasRoughnessConnected() |
MaterialShared.h | ||
virtual bool HasRuntimeVirtualTextureOutput() |
MaterialShared.h | ||
bool HasShaders
(
const FMaterialShaderTypes& InTypes, |
MaterialShared.h | ||
virtual bool HasSpecularConnected() |
MaterialShared.h | ||
virtual bool HasSubstrateRoughnessTracking() |
MaterialShared.h | ||
bool HasValidGameThreadShaderMap() |
Checks if there is a valid GameThreadShaderMap, that is, the material can be rendered as intended. | MaterialShared.h | |
virtual bool HasVertexInterpolator() |
MaterialShared.h | ||
virtual bool HasVertexPositionOffsetConnected() |
MaterialShared.h | ||
bool IsCachingShaders() |
Returns whether or not a material caching is still pending. | MaterialShared.h | |
bool IsCompilationFinished() |
Checks if the compilation for this shader is finished | MaterialShared.h | |
virtual bool IsDefaultMaterial() |
MaterialShared.h | ||
bool IsDeferredDecal() |
MaterialShared.h | ||
virtual bool IsDisplacementFadeEnabled() |
MaterialShared.h | ||
virtual bool IsDistorted() |
MaterialShared.h | ||
bool IsDitheredLODTransition() |
MaterialShared.h | ||
virtual bool IsDitherMasked() |
MaterialShared.h | ||
virtual bool IsDualBlendingEnabled
(
EShaderPlatform Platform |
MaterialShared.h | ||
virtual bool IsFullyRough() |
MaterialShared.h | ||
bool IsGameThreadShaderMapComplete() |
MaterialShared.h | ||
bool IsLightFunction() |
MaterialShared.h | ||
bool IsMasked() |
MaterialShared.h | ||
virtual bool IsMobileSeparateTranslucencyEnabled() |
MaterialShared.h | ||
virtual bool IsNonmetal() |
MaterialShared.h | ||
bool IsOwnerBeginDestroyed() |
MaterialShared.h | ||
bool IsPersistent() |
Should shaders compiled for this material be saved to disk? | MaterialShared.h | |
virtual bool IsPostProcessMaterial() |
MaterialShared.h | ||
virtual bool IsPreview() |
MaterialShared.h | ||
bool IsRenderingThreadShaderMapComplete() |
MaterialShared.h | ||
bool IsRequiredComplete() |
Is the material required to be complete? Default materials, special engine materials, etc | MaterialShared.h | |
bool IsShadingModelFromMaterialExpression() |
MaterialShared.h | ||
virtual bool IsSky() |
MaterialShared.h | ||
bool IsSpecialEngineMaterial() |
MaterialShared.h | ||
virtual bool IsStencilTestEnabled() |
MaterialShared.h | ||
virtual bool IsSubstrateMaterial() |
MaterialShared.h | ||
virtual bool IsTangentSpaceNormal() |
MaterialShared.h | ||
virtual bool IsTessellationEnabled() |
MaterialShared.h | ||
bool IsThinSurface() |
MaterialShared.h | ||
virtual bool IsTranslucencyAfterDOFEnabled() |
MaterialShared.h | ||
virtual bool IsTranslucencyAfterMotionBlurEnabled() |
MaterialShared.h | ||
virtual bool IsTranslucencyVelocityFromDepth() |
MaterialShared.h | ||
virtual bool IsTranslucencyWritingCustomDepth() |
MaterialShared.h | ||
virtual bool IsTranslucencyWritingFrontLayerTransparency() |
MaterialShared.h | ||
virtual bool IsTranslucencyWritingVelocity() |
MaterialShared.h | ||
bool IsTwoSided() |
MaterialShared.h | ||
bool IsUIMaterial() |
MaterialShared.h | ||
virtual bool IsUsedWithAPEXCloth() |
MaterialShared.h | ||
virtual bool IsUsedWithBeamTrails() |
MaterialShared.h | ||
virtual bool IsUsedWithEditorCompositing() |
MaterialShared.h | ||
virtual bool IsUsedWithGeometryCache() |
MaterialShared.h | ||
virtual bool IsUsedWithGeometryCollections() |
MaterialShared.h | ||
virtual bool IsUsedWithHairStrands() |
MaterialShared.h | ||
virtual bool IsUsedWithHeterogeneousVolumes() |
MaterialShared.h | ||
virtual bool IsUsedWithInstancedStaticMeshes() |
MaterialShared.h | ||
virtual bool IsUsedWithLandscape() |
MaterialShared.h | ||
virtual bool IsUsedWithLidarPointCloud() |
MaterialShared.h | ||
virtual bool IsUsedWithMeshParticles() |
MaterialShared.h | ||
virtual bool IsUsedWithMorphTargets() |
MaterialShared.h | ||
virtual bool IsUsedWithNanite() |
MaterialShared.h | ||
virtual bool IsUsedWithNeuralNetworks() |
MaterialShared.h | ||
virtual bool IsUsedWithNiagaraMeshParticles() |
MaterialShared.h | ||
virtual bool IsUsedWithNiagaraRibbons() |
MaterialShared.h | ||
virtual bool IsUsedWithNiagaraSprites() |
MaterialShared.h | ||
virtual bool IsUsedWithParticleSprites() |
MaterialShared.h | ||
virtual bool IsUsedWithParticleSystem() |
MaterialShared.h | ||
virtual bool IsUsedWithSkeletalMesh() |
MaterialShared.h | ||
virtual bool IsUsedWithSplineMeshes() |
MaterialShared.h | ||
virtual bool IsUsedWithStaticLighting() |
MaterialShared.h | ||
virtual bool IsUsedWithStaticMesh() |
MaterialShared.h | ||
virtual bool IsUsedWithUI() |
MaterialShared.h | ||
virtual bool IsUsedWithVirtualHeightfieldMesh() |
MaterialShared.h | ||
virtual bool IsUsedWithVolumetricCloud() |
MaterialShared.h | ||
virtual bool IsUsedWithWater() |
MaterialShared.h | ||
virtual bool IsUsingAlphaToCoverage() |
MaterialShared.h | ||
virtual bool IsUsingHQForwardReflections() |
MaterialShared.h | ||
virtual bool IsUsingNewHLSLGenerator() |
Is the material using the new (WIP) HLSL generator? | MaterialShared.h | |
virtual bool IsUsingPlanarForwardReflections() |
MaterialShared.h | ||
virtual bool IsUsingPreintegratedGFForSimpleIBL() |
MaterialShared.h | ||
virtual bool IsVariableRateShadingAllowed() |
MaterialShared.h | ||
bool IsVolumetricPrimitive() |
MaterialShared.h | ||
bool IsWireframe() |
MaterialShared.h | ||
virtual void LegacySerialize
(
FArchive& Ar |
Serializes the material. | MaterialShared.h | |
uint8 MaterialGetSubstrateClosureCount_GameThread() |
Get Substrate material BSDF count. | MaterialShared.h | |
uint8 MaterialGetSubstrateClosureCount_RenderThread() |
MaterialShared.h | ||
uint8 MaterialGetSubstrateMaterialType_GameThread() |
Get Substrate material type (single, single, complex slab). | MaterialShared.h | |
uint8 MaterialGetSubstrateMaterialType_RenderThread() |
MaterialShared.h | ||
uint8 MaterialGetSubstrateUintPerPixel_GameThread() |
Get Substrate material uint count per pixel. | MaterialShared.h | |
uint8 MaterialGetSubstrateUintPerPixel_RenderThread() |
MaterialShared.h | ||
bool MaterialGetSubstrateUsesComplexSpecialRenderPath_GameThread() |
Get Substrate material special path requirement (for more expenssive features such as Glints or SpecularLUT). | MaterialShared.h | |
bool MaterialGetSubstrateUsesComplexSpecialRenderPath_RenderThread() |
MaterialShared.h | ||
bool MaterialIsLightFunctionAtlasCompatible_GameThread() |
Get whether or not the material is compatible with the light function atlas. | MaterialShared.h | |
bool MaterialIsLightFunctionAtlasCompatible_RenderThread() |
MaterialShared.h | ||
bool MaterialMayModifyMeshPosition() |
Note: This function is only intended for use in deciding whether or not shader permutations are required before material translation occurs. | MaterialShared.h | |
bool MaterialModifiesMeshPosition_GameThread() |
MaterialShared.h | ||
bool MaterialModifiesMeshPosition_RenderThread() |
Does the material modify the mesh position. | MaterialShared.h | |
bool MaterialUsesAnisotropy_GameThread() |
MaterialShared.h | ||
bool MaterialUsesAnisotropy_RenderThread() |
MaterialShared.h | ||
bool MaterialUsesDisplacement_GameThread() |
MaterialShared.h | ||
bool MaterialUsesDisplacement_RenderThread() |
Does the material use displacement. | MaterialShared.h | |
bool MaterialUsesDistanceCullFade_GameThread() |
Does the material use a distance cull fade. | MaterialShared.h | |
bool MaterialUsesPixelDepthOffset_GameThread() |
MaterialShared.h | ||
bool MaterialUsesPixelDepthOffset_RenderThread() |
Does the material use a pixel depth offset. | MaterialShared.h | |
bool MaterialUsesSceneDepthLookup_GameThread() |
MaterialShared.h | ||
bool MaterialUsesSceneDepthLookup_RenderThread() |
Does the material use a SceneDepth lookup. | MaterialShared.h | |
bool MaterialUsesWorldPositionOffset_GameThread() |
MaterialShared.h | ||
bool MaterialUsesWorldPositionOffset_RenderThread() |
Does the material use world position offset. | MaterialShared.h | |
bool NeedsGBuffer() |
MaterialShared.h | ||
bool NeedsSceneTextures() |
MaterialShared.h | ||
virtual void NotifyCompilationFinished() |
Called when compilation of an FMaterial finishes, after the GameThreadShaderMap is set and the render command to set the RenderThreadShaderMap is queued | MaterialShared.h | |
virtual bool PrepareDestroy_GameThread() |
Prepares to destroy the material, must be called from game thread Returns 'true' if PrepareDestroy_RenderThread() is required | MaterialShared.h | |
virtual void PrepareDestroy_RenderThread() |
Prepares to destroy the material, must be called from render thread, only if PrepareDestroy_GameThread() returned true | MaterialShared.h | |
void RegisterInlineShaderMap
(
bool bLoadingCooked |
Serializes the shader map inline in this material, including any shader dependencies. | MaterialShared.h | |
uint32 Release() |
MaterialShared.h | ||
void ReleaseShaderMap () |
Releases this material's shader map. | MaterialShared.h | |
bool RequiresSceneColorCopy_GameThread() |
MaterialShared.h | ||
bool RequiresSceneColorCopy_RenderThread() |
MaterialShared.h | ||
virtual bool RequiresSynchronousCompilation() |
MaterialShared.h | ||
void SaveShaderStableKeys
(
EShaderPlatform TargetShaderPlatform, |
MaterialShared.h | ||
| Serializes the shader map inline in this material, including any shader dependencies. | MaterialShared.h | ||
void SetCompileErrors
(
const TArray< FString >& InCompileErrors |
MaterialShared.h | ||
void SetGameThreadShaderMap
(
FMaterialShaderMap* InMaterialShaderMap |
MaterialShared.h | ||
void SetInlineShaderMap
(
FMaterialShaderMap* InMaterialShaderMap |
MaterialShared.h | ||
void SetOwnerBeginDestroyed() |
MaterialShared.h | ||
void SetRenderingThreadShaderMap
(
TRefCountPtr< FMaterialShaderMap >& InMaterialShaderMap |
MaterialShared.h | ||
virtual void SetSubstrateCompilationConfig
(
FSubstrateCompilationConfig& SubstrateCompilationConfig |
Set the Substrate compilation config | MaterialShared.h | |
virtual void SetupExtraCompilationSettings
(
const EShaderPlatform Platform, |
Call during shader compilation jobs setup to fill additional settings that may be required by classes who inherit from this | MaterialShared.h | |
virtual bool ShouldAlwaysEvaluateWorldPositionOffset() |
MaterialShared.h | ||
virtual bool ShouldApplyCloudFogging() |
MaterialShared.h | ||
virtual bool ShouldApplyFogging() |
MaterialShared.h | ||
virtual bool ShouldCache
(
EShaderPlatform Platform, |
Should the shader for this material with the given platform, shader type and vertex factory type combination be compiled | MaterialShared.h | |
bool ShouldCachePipeline
(
EShaderPlatform Platform, |
MaterialShared.h | ||
bool ShouldCacheShaders
(
const EShaderPlatform ShaderPlatform, |
MaterialShared.h | ||
bool ShouldCastDynamicShadows() |
Returns whether this material should be considered for casting dynamic shadows. | MaterialShared.h | |
virtual bool ShouldDisableDepthTest() |
MaterialShared.h | ||
virtual bool ShouldDoContactShadows() |
MaterialShared.h | ||
virtual bool ShouldDoSSR() |
MaterialShared.h | ||
virtual bool ShouldEnableResponsiveAA() |
MaterialShared.h | ||
virtual bool ShouldGenerateSphericalParticleNormals() |
MaterialShared.h | ||
virtual bool ShouldInlineShaderCode() |
MaterialShared.h | ||
virtual bool ShouldWriteOnlyAlpha() |
MaterialShared.h | ||
void SubmitCompileJobs_GameThread
(
EShaderCompileJobPriority Priority |
MaterialShared.h | ||
void SubmitCompileJobs_RenderThread
(
EShaderCompileJobPriority Priority |
MaterialShared.h | ||
virtual bool SupportsMaterialCache() |
MaterialShared.h | ||
bool TryGetShaders
(
const FMaterialShaderTypes& InTypes, |
MaterialShared.h | ||
void UpdateInlineShaderMapIsComplete() |
MaterialShared.h | ||
virtual bool UseLmDirectionality() |
MaterialShared.h | ||
virtual bool UseNormalCurvatureToRoughness() |
MaterialShared.h | ||
bool UsesEyeAdaptation() |
MaterialShared.h | ||
bool UsesGlobalDistanceField_GameThread() |
MaterialShared.h | ||
bool WritesEveryPixel
(
bool bShadowPass |
Helper function to look at both IsMasked and IsDitheredLODTransition to determine if it writes every pixel | MaterialShared.h | |
bool WritesEveryPixel
(
bool bShadowPass, |
MaterialShared.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddShaderMapIDsWithUnfinishedCompilation
(
TArray< int32 >& ShaderMapIds |
Fills the passed array with IDs of shader maps unfinished compilation jobs. | MaterialShared.h | |
bool AllowPixelDepthOffset() |
MaterialShared.h | ||
virtual bool CheckInValidStateForCompilation
(
FMaterialCompiler* Compiler |
Checks that no pre-compilation errors have been detected and if so it reports them using specified compiler. | MaterialShared.h | |
virtual int32 CompileCustomAttribute
(
const FGuid& AttributeID, |
Used to translate code for custom output attributes such as ClearCoatBottomNormal | MaterialShared.h | |
int32 CompilePropertyAndSetMaterialProperty
(
EMaterialProperty Property, |
Entry point for compiling a specific material property. This must call SetMaterialProperty. | MaterialShared.h | |
virtual FString GetBaseMaterialPathName() |
Useful for debugging. | MaterialShared.h | |
virtual FString GetDebugName() |
MaterialShared.h | ||
void GetDependentShaderAndVFTypes
(
EShaderPlatform Platform, |
Produces arrays of any shader and vertex factory type that this material is dependent on. | MaterialShared.h | |
uint32 GetGameThreadCompilingShaderMapId() |
MaterialShared.h | ||
bool GetLoadedCookedShaderMapId() |
MaterialShared.h | ||
virtual UMaterialExpression * GetMaterialGraphNodePreviewExpression () |
The returned value is not const because the expression is used to build the Substrate tree and this requires to execute multiple such as link function caller, compile expression, etc. | MaterialShared.h | |
FGuid GetMaterialId() |
Gets the Guid that represents this material. | MaterialShared.h | |
const FMaterialShaderMap * GetShaderMapToUse() |
Shared code needed for GetUniformScalarParameterExpressions, GetUniformVectorParameterExpressions, GetUniformCubeTextureExpressions.. | MaterialShared.h | |
virtual EMaterialShaderMapUsage::Type GetShaderMapUsage () |
Gets the shader map usage of the material, which will be included in the DDC key. | MaterialShared.h | |
void SetAllowPixelDepthOffset
(
bool bEnable |
MaterialShared.h | ||
void SetCompilingShaderMap
(
FMaterialShaderMap* InMaterialShaderMap |
MaterialShared.h | ||
void SetQualityLevelProperties
(
ERHIFeatureLevel::Type InFeatureLevel, |
MaterialShared.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddEditorLoadedMaterialResource
(
FMaterial* Material |
Adds an FMaterial to the global list. | MaterialShared.h | |
static void DeferredDelete
(
FMaterial* Material |
MaterialShared.h | ||
static void DeferredDeleteArray
(
TArray< TRefCountPtr< TMaterial > >& Materials |
MaterialShared.h | ||
static void DeferredDeleteArray
(
TArray< TMaterial* >& Materials |
MaterialShared.h | ||
static void DeleteMaterialsOnRenderThread
(
TArray< TRefCountPtr< FMaterial > >& MaterialsRenderThread |
MaterialShared.h | ||
static void FinishCompilation
(
const TCHAR* MaterialName, |
Blocks until compilation has completed. Returns immediately if a compilation is not outstanding. | MaterialShared.h | |
static void GetOutputPrecision
(
EMaterialFloatPrecisionMode FloatPrecisionMode, |
Get the float precision mode for the material and shader taking into account any project wide precision values | MaterialShared.h | |
static void SetShaderMapsOnMaterialResources
(
const TMap< TRefCountPtr< FMaterial >, TRefCountPtr< FMaterialShaderMap > >& MaterialsToUpdate |
Sets shader maps on the specified materials without blocking. | MaterialShared.h | |
static void UpdateEditorLoadedMaterialResources
(
EShaderPlatform InShaderPlatform |
Recompiles any materials in the EditorLoadedMaterialResources list if they are not complete. | MaterialShared.h |