Language:
Discover
By Skill Level
By Category

FMaterialShaderMap

Choose your OS:

Inheritance Hierarchy

Syntax

class FMaterialShaderMap :
    public TShaderMap< FMaterialShaderType > ,
    public FDeferredCleanupInterface

Remarks

The set of material shaders for a single material.

Constructors

Name Description

Public function

FMaterialShaderMap()

Public function

FMaterialShaderMap

(
    EShaderPlatform InPlatform
)

Destructors

Name Description

Public function

~FMaterialShaderMap()

Destructor.

Functions

Name Description

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

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...,
    TRefCountPtr < FShaderCompilerEnviro ...,
    const FMaterialCompilationOutput & ...,
    EShaderPlatform Platform,
    bool bSynchronousCompile,
    bool bApplyCompletedShaderMapForRen...
)

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

Public function

bool

 

CompiledSuccessfully()

Public function

void

 

CountNumShaders

(
    int32 & NumShaders,
    int32 & NumPipelines
)

Public function

void

 

DumpDebugInfo()

Public function Static

FMaterialSha ...

 

FindId

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

Finds the shader map for a material.

NULL if no cached shader map was found.

Public function Static

void

 

FixupShaderTypes

(
    EShaderPlatform Platform,
    const TMap < FShaderType *, FStr ...,
    const TMap < const FShaderPipelineTy ...,
    const TMap < FVertexFactoryType *...
)

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

(
    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 < FShaderType * >& Shade...,
    TArray < const FShaderPipelineType &...,
    TArray < const FVertexFactoryType &#...
)

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

Public function

uint32

 

GetCompilingId()

Public function

const FStrin ...

 

GetDebugDescription()

Public function

void

 

GetEstimatedNumTextureSamples

(
    uint32 & VSSamples,
    uint32 & PSSamples
)

Public function

const FStrin ...

 

GetFriendlyName()

Public function

uint32

 

GetMaxTextureSamplers()

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

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3) c...

 

GetMeshShaderMap

(
    FVertexFactoryType * VertexFact...
)

Accessors.

Public function

int32

 

GetNumRefs()

Public function

uint32

 

GetNumUsedCustomInterpolatorScalars()

Public function

uint32

 

GetNumUsedUVScalars()

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

GetShaderList

(
    TMap < FShaderId , FShader * >& ...
)

Builds a list of the shaders in a shader map.

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

GetShaderList

(
    TMap < FName , FShader * >& OutS...
)

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

Public function Static

const FMater ...

 

GetShaderMapBeingCompiled

(
    const FMaterial * Material
)

Finds a shader map currently being compiled that was enqueued for the given material.

Public function

const FMater ...

 

GetShaderMapId()

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

GetShaderPipelineList

(
    TArray < FShaderPipeline * >& O...
)

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

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3) c...

 

GetShaderSource

(
    const FName ShaderTypeName
)

Public function

uint32

 

GetSizeBytes()

Computes the memory used by this shader map without counting the shaders themselves.

Public function

const FUnifo ...

 

GetUniformExpressionSet()

Public function

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

bool

 

IsValidForRendering()

Public function Static

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

LoadForRemoteRecompile

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

Public function Static

void

 

LoadFromDerivedDataCache

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

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

bool

 

ModifiesMeshPosition()

Public function

bool

 

NeedsGBuffer()

Public function

bool

 

NeedsSceneTextures()

Public function

bool

 

ProcessCompilationResults

(
    const TArray < FShaderCommonCompileJ ...,
    int32 & ResultIndex,
    float& TimeBudget,
    TMap < const FVertexFactoryType *...
)

Sorts the incoming compiled jobs into the appropriate mesh shader maps, and finalizes this shader map so that it can be used for rendering.

Public function

void

 

Register

(
    EShaderPlatform InShaderPlatform
)

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

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

Release()

Public function Static

void

 

RemovePendingMaterial

(
    FMaterial * Material
)

Removes a material from ShaderMapsBeingCompiled.

Public function

bool

 

RequiresSceneColorCopy()

Public function

void

 

RestoreShadersFromMemory

(
    const TArray < uint8 >& ShaderData
)

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

Public function Static

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

SaveForRemoteRecompile

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

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()

Saves this shader map to the derived data cache.

Public function

void

 

Serialize

(
    FArchive & Ar,
    bool bInlineShaderResources
)

Serializes the shader map.

Public function

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 function

bool

 

UsesEyeAdaptation()

Public function

bool

 

UsesGlobalDistanceField()

Public function

bool

 

UsesPixelDepthOffset()

Public function

bool

 

UsesSceneDepthLookup()

Public function

bool

 

UsesWorldPositionOffset()

Overridden from TShaderMap

Name Description

Public function Virtual

void

 

DiscardSerializedShaders()

Discards serialized shaders when they are not going to be used for anything (NullRHI)

Public function Virtual

void

 

RegisterSerializedShaders()

Registers all shaders that have been loaded in Serialize

Constants

Name

Description

AllMaterialShaderMaps

All material shader maps in memory.

GIdToMaterialShaderMap

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

NextCompilingId

The Id of 0 is reserved for global shaders.

ShaderMapsBeingCompiled

Tracks material resources and their shader maps that need to be compiled but whose compilation is being deferred.

References

Module

Engine

Header

Runtime/Engine/Public/MaterialShared.h