FMaterialShaderMap

The set of material shaders for a single material.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/MaterialShared.h

Include

#include "MaterialShared.h"

Syntax

class FMaterialShaderMap :
    public TShaderMap< FMaterialShaderMapContent, FShaderMapPointerTable >,
    public FDeferredCleanupInterface

Remarks

The set of material shaders for a single material.

Constructors

Name Description

Public function

FMaterialShaderMap()

Destructors

Name Description

Public function Virtual

~FMaterialShaderMap()

Functions

Name Description

Public function

uint32

 

AcquireCompilingId

(
    const TRefCountPtr< FSharedShaderCo...
)

Public function

FMaterialSha...

 

AcquireFinalizedClone()

Public function

FMeshMateria...

 

AcquireMeshShaderMap

(
    const FHashedName& VertexFactoryTy...
)

Public function

FMeshMateria...

 

AcquireMeshShaderMap

(
    const FVertexFactoryType* Vert...
)

Public function

void

 

AddCompilingDependency

(
    FMaterial* Material
)

Public function

void

 

AddRef()

Reference counting.

Public function

TArray< uint...

 

BackupShadersToMemory()

Backs up any FShaders in this shader map to memory through serialization and clears FShader references.

Public function

void

 

Compile

(
    FMaterial* Material,
    const FMaterialShaderMapId& Shader...,
    const TRefCountPtr< FSharedShaderCo...,
    const FMaterialCompilationOutput& ...,
    EShaderPlatform Platform,
    EMaterialShaderPrecompileMode Preco...
)

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

Public function Const

bool

 

CompiledSuccessfully()

Public function Const

void

 

CountNumShaders

(
    int32& NumShaders,
    int32& NumPipelines
)

Public function

void

 

DumpDebugInfo()

Public function Static

FMaterialSha...

 

FindCompilingShaderMap

(
    uint32 CompilingId
)

Public function Static

TRefCountPtr...

 

FindId

(
    const FMaterialShaderMapId& Shader...,
    EShaderPlatform Platform
)

Finds the shader map for a material. Finds the shader map for a material.

Public function

void

 

FlushShadersByShaderPipelineType

(
    const FShaderPipelineType* Sha...
)

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

Public function

void

 

FlushShadersByShaderType

(
    const FShaderType* ShaderType
)

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

Public function

void

 

FlushShadersByVertexFactoryType

(
    const FVertexFactoryType* Vert...
)

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

Public function Static

void

 

FlushShaderTypes

(
    TArray< const FShaderType* >&...,
    TArray< const FShaderPipelineType&...,
    TArray< const FVertexFactoryType&#...
)

Flushes the given shader types from any loaded FMaterialShaderMap's.

Public function Static

void

 

GetAllOutdatedTypes

(
    TArray< const FShaderType* >&...,
    TArray< const FShaderPipelineType&...,
    TArray< const FVertexFactoryType&#...
)

Gets outdated types from all loaded material shader maps

Public function Const

uint32

 

GetCompilingId()

Public function Const

const TCHAR ...

 

GetDebugDescription()

Public function Const

void

 

GetEstimatedNumTextureSamples

(
    uint32& VSSamples,
    uint32& PSSamples
)

Public function Const

uint32

 

GetEstimatedNumVirtualTextureLookups()

Public function Const

FMaterialSha...

 

GetFinalizedClone()

Public function Const

const TCHAR ...

 

GetFriendlyName()

Public function Const

const TCHAR ...

 

GetMaterialPath()

Public function Const

uint32

 

GetMaxNumInstructionsForShader

(
    FShaderType* ShaderType
)

Public function Const

uint32

 

GetMaxTextureSamplers()

Returns the maximum number of texture samplers used by any shader in this shader map.

Public function Const

const FMeshM...

 

GetMeshShaderMap

(
    const FHashedName& VertexFactoryTy...
)

Public function Const

const FMeshM...

 

GetMeshShaderMap

(
    const FVertexFactoryType* Vert...
)

Accessors.

Public function Const

int32

 

GetNumRefs()

Public function Const

uint32

 

GetNumUsedCustomInterpolatorScalars()

Public function Const

uint32

 

GetNumUsedUVScalars()

Public function Const

uint32

 

GetNumVirtualTextureStacks()

Public function Const

void

 

GetOutdatedTypes

(
    TArray< const FShaderType* >&...,
    TArray< const FShaderPipelineType&...,
    TArray< const FVertexFactoryType&#...
)

Public function Const

const TRefCo...

 

GetPendingCompilerEnvironment()

Public function Const

int32

 

GetRefCount()

Public function Const

uint8

 

GetRuntimeVirtualTextureOutputAttributeMask()

Public function Const

TShaderRef< ...

 

GetShader

(
    FShaderType* ShaderType,
    int32 PermutationId
)

Public function Const

TShaderRef< ...

 

GetShader

(
    const typename ShaderType::FPermuta...
)

Public function Const

TShaderRef< ...

 

GetShader

(
    int32 PermutationId
)

Public function Const

const FSHAHa...

 

GetShaderContentHash()

Public function Const

void

 

GetShaderList

(
    TMap< FHashedName, TShaderRef< FSha...
)

Builds a list of the shaders in a shader map. Key is FShaderType::TypeName

Public function Const

void

 

GetShaderList

(
    TMap< FShaderId, TShaderRef< FShade...
)

Builds a list of the shaders in a shader map.

Public function Const

const FMater...

 

GetShaderMapId()

Public function Const

uint32

 

GetShaderNum()

Number of Shaders in Shadermap

Public function Const

void

 

GetShaderPipelineList

(
    TArray< FShaderPipelineRef >& OutS...
)

Builds a list of the shader pipelines in a shader map.

Public function Const

const FMemor...

 

GetShaderSource

(
    const FName ShaderTypeName
)

Public function Const

const FUnifo...

 

GetUniformExpressionSet()

Public function

void

 

InitalizeForODSC

(
    EShaderPlatform TargetShaderPlatfor...,
    const FMaterialCompilationOutput& ...
)

Public function Const

bool

 

IsCompilationFinalized()

Public function

bool

 

IsComplete

(
    const FMaterial* Material,
    bool bSilent
)

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

Public function Const

bool

 

IsValidForRendering

(
    bool bFailOnInvalid
)

Public function Static

void

 

LoadForRemoteRecompile

(
    FArchive& Ar,
    EShaderPlatform ShaderPlatform,
    const TArray< FString >& Materials...
)

Public function Static

void

 

LoadFromDerivedDataCache

(
    const FMaterial* Material,
    const FMaterialShaderMapId& Shader...,
    EShaderPlatform Platform,
    const ITargetPlatform* TargetP...,
    TRefCountPtr< FMaterialShaderMap > ...,
    FString& OutDDCKeyDesc
)

Attempts to load the shader map for the given material from the Derived Data Cache.

Public function

void

 

LoadMissingShadersFromMemory

(
    const FMaterial* Material
)

Attempts to load missing shaders from memory.

Public function Const

bool

 

ModifiesMeshPosition()

Public function Const

bool

 

NeedsGBuffer()

Public function Const

bool

 

NeedsSceneTextures()

Public function

void

 

ProcessCompilationResults

(
    const TArray< TRefCountPtr< FShader...,
    int32& InOutJobIndex,
    float& TimeBudget
)

Sorts the incoming compiled jobs into the appropriate mesh shader maps

Public function

void

 

Register

(
    EShaderPlatform InShaderPlatform
)

Registers a material shader map in the global map so it can be used by materials.

Public function

void

 

Release()

Public function

void

 

ReleaseCompilingId()

Public function

void

 

RemoveCompilingDependency

(
    FMaterial* Material
)

Public function Const

bool

 

RequiresSceneColorCopy()

Public function

void

 

RestoreShadersFromMemory

(
    const TArray< uint8 >& ShaderData
)

Recreates FShaders from the passed in memory, handling shader key changes.

Public function Static

void

 

SaveForRemoteRecompile

(
    FArchive& Ar,
    const TMap< FString, TArray< TRefCo...
)

Serializes a shader map to an archive (used with recompiling shaders for a remote console)

Public function

void

 

SaveShaderStableKeys

(
    EShaderPlatform TargetShaderPlatfor...,
    const FStableShaderKeyAndValue& Sa...
)

Public function

void

 

SaveToDerivedDataCache

(
    const ITargetPlatform* TargetP...
)

Saves this shader map to the derived data cache.

Public function

bool

 

Serialize

(
    FArchive& Ar,
    bool bInlineShaderResources,
    bool bLoadedByCookedMaterial,
    bool bInlineShaderCode
)

Serializes the shader map.

Public function

void

 

SetCompiledSuccessfully

(
    bool bSuccess
)

Public function Const

void

 

SubmitCompileJobs

(
    uint32 CompilingShaderMapId,
    const FMaterial* Material,
    const TRefCountPtr< FSharedShaderCo...,
    EShaderCompileJobPriority Priority
)

Public function Const

bool

 

UsesAnisotropy()

Public function Const

bool

 

UsesDistanceCullFade()

Public function Const

bool

 

UsesEyeAdaptation()

Public function Const

bool

 

UsesGlobalDistanceField()

Public function Const

bool

 

UsesPixelDepthOffset()

Public function Const

bool

 

UsesSceneDepthLookup()

Public function Const

bool

 

UsesSceneTexture

(
    uint32 TexId
)

Public function Const

bool

 

UsesVelocitySceneTexture()

Public function Const

bool

 

UsesWorldPositionOffset()

Typedefs

Name

Description

Super

Constants

Name

Description

AllMaterialShaderMaps

All material shader maps in memory.

AllMaterialShaderMapsGuard

Guards access to AllMaterialShaderMaps, which can be written to from an async loading thread.

GIdToMaterialShaderMap

A global map from a material's static parameter set to any shader map cached for that material.

GIdToMaterialShaderMapCS

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss