FNiagaraShaderMap

The set of shaders for a single script.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

NiagaraShader

Header

/Engine/Plugins/FX/Niagara/Source/NiagaraShader/Public/NiagaraShared.h

Include

#include "NiagaraShared.h"

Syntax

Remarks

The set of shaders for a single script.

Constructors

Name Description

Public function

FNiagaraShaderMap()

Destructors

Name Description

Public function

~FNiagaraShaderMap()

Destructor.

Functions

Name Description

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

(
    FNiagaraShaderScript* Script,
    const FNiagaraShaderMapId& ShaderM...,
    TRefCountPtr< FSharedShaderCompiler...,
    const FNiagaraComputeShaderCompilat...,
    EShaderPlatform Platform,
    bool bSynchronousCompile,
    bool bApplyCompletedShaderMapForRen...
)

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

Public function Const

bool

 

CompiledSuccessfully()

Public function Static

FNiagaraShad...

 

FindId

(
    const FNiagaraShaderMapId& ShaderM...,
    EShaderPlatform Platform
)

Finds the shader map for a script. Finds the shader map for a script.

Public function

void

 

FlushShadersByShaderType

(
    const FShaderType* ShaderType
)

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

Public function Static

void

 

FlushShaderTypes

(
    TArray< const FShaderType* >&...
)

Flushes the given shader types from any loaded FNiagaraShaderMaps.

Public function

uint32

 

GetCompilingId()

Public function Const

uint32

 

GetCompilingId()

Public function Const

const FMemor...

 

GetDebugDescription()

Public function Const

const FMemor...

 

GetFriendlyName()

Public function Static

TMap< TRefCo...

 

GetInFlightShaderMaps()

Public function Const

int32

 

GetNumRefs()

Public function Const

TNiagaraShad...

 

GetShader

(
    int32 PermutationId
)

Public function Const

TNiagaraShad...

 

GetShader

(
    FShaderType* ShaderType,
    int32 PermutationId
)

Public function Const

void

 

GetShaderList

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

Builds a list of the shaders in a shader map.

Public function Static

const FNiaga...

 

GetShaderMapBeingCompiled

(
    const FNiagaraShaderScript* Sc...
)

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

Public function Const

const FNiaga...

 

GetShaderMapId()

Accessors.

Public function Const

EShaderPlatf...

 

GetShaderPlatform()

Public function Const

bool

 

IsCompilationFinalized()

Public function

bool

 

IsComplete

(
    const FNiagaraShaderScript* Sc...,
    bool bSilent
)

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

Public function Const

bool

 

IsValid()

Public function Static

void

 

LoadFromDerivedDataCache

(
    const FNiagaraShaderScript* Sc...,
    const FNiagaraShaderMapId& ShaderM...,
    EShaderPlatform Platform,
    TRefCountPtr< FNiagaraShaderMap >&...
)

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

Public function

void

 

LoadMissingShadersFromMemory

(
    const FNiagaraShaderScript* Sc...
)

Attempts to load missing shaders from memory.

Public function

bool

 

ProcessCompilationResults

(
    const TArray< TRefCountPtr< class F...,
    int32& ResultIndex,
    float& TimeBudget
)

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
)

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

Public function

void

 

Release()

Public function Static

void

 

RemovePendingMap

(
    FNiagaraShaderMap* Map
)

Public function Static

bool

 

RemovePendingScript

(
    FNiagaraShaderScript* Script
)

Removes a Script from NiagaraShaderMapsBeingCompiled.

Public function

void

 

RestoreShadersFromMemory

(
    const TArray< uint8 >& ShaderData
)

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

Public function

void

 

SaveToDerivedDataCache()

Saves this shader map to the derived data cache.

Public function

bool

 

Serialize

(
    FArchive& Ar,
    bool bInlineShaderResources,
    bool bLoadedByCookedMaterial
)

Serializes the shader map.

Public function

void

 

SetCompiledSuccessfully

(
    bool bSuccess
)

Public function

bool

 

TryToAddToExistingCompilationTask

(
    FNiagaraShaderScript* Script
)

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

Typedefs

Name

Description

Super

Constants

Name

Description

AllNiagaraShaderMaps

All script shader maps in memory.

GIdToNiagaraShaderMap

A global map from a script's ID and static switch set to any shader map cached for that script.

NiagaraShaderMapsBeingCompiled

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