Navigation
API > API/Plugins > API/Plugins/NiagaraShader
Inheritance Hierarchy
- TShaderMap
- FDeferredCleanupInterface
- FNiagaraShaderMap
References
| Module | NiagaraShader |
| Header | /Engine/Plugins/FX/Niagara/Source/NiagaraShader/Public/NiagaraShared.h |
| Include | #include "NiagaraShared.h" |
Syntax
class FNiagaraShaderMap :
public TShaderMap< FNiagaraShaderMapContent, FNiagaraShaderMapPointerTable >,
public FDeferredCleanupInterface
Remarks
The set of shaders for a single script.
Constructors
| Type | Name | Description | |
|---|---|---|---|
Destructors
| Type | Name | Description | |
|---|---|---|---|
| Destructor. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddRef () |
Reference counting. | |
| TArray< uint8 > * | Backs up any FShaders in this shader map to memory through serialization and clears FShader references. | ||
| void | Compile
(
FNiagaraShaderScript* Script, |
Compiles the shaders for a script and caches them in this shader map. | |
| bool | |||
| FNiagaraShaderMap * | FindId
(
const FNiagaraShaderMapId& ShaderMapId, |
Finds the shader map for a script. Finds the shader map for a script. | |
| uint32 | |||
| uint32 | |||
| const FMemoryImageString & | |||
| const FMemoryImageString & | |||
| TMap< TRefCountPtr< FNiagaraShaderMap >, TArray< FNiagaraShaderScript * > > & | |||
| int32 | GetNumRefs () |
||
| TNiagaraShaderRef< ShaderType > | GetShader
(
int32 PermutationId |
||
| TNiagaraShaderRef< FShader > | GetShader
(
FShaderType* ShaderType, |
||
| void | GetShaderList
(
TMap< FShaderId, TShaderRef< FShader >>& OutShaders |
Builds a list of the shaders in a shader map. | |
| const FNiagaraShaderMap * | GetShaderMapBeingCompiled
(
const FNiagaraShaderScript* Script |
Finds a shader map currently being compiled that was enqueued for the given script. | |
| const FNiagaraShaderMapId & | Accessors. | ||
| EShaderPlatform | |||
| bool | |||
| bool | IsComplete
(
const FNiagaraShaderScript* Script, |
Checks whether the shader map is missing any shader types necessary for the given script. | |
| bool | IsValid () |
||
| void | LoadFromDerivedDataCache
(
const FNiagaraShaderScript* Script, |
Attempts to load the shader map for the given script from the Derived Data Cache. | |
| void | LoadMissingShadersFromMemory
(
const FNiagaraShaderScript* Script |
Attempts to load missing shaders from memory. | |
| bool | ProcessCompilationResults
(
const TArray< TRefCountPtr< class FShaderCommonCompileJob >>& InCompilationResults, |
Sorts the incoming compiled jobs into the appropriate mesh shader maps, and finalizes this shader map so that it can be used for rendering. | |
| void | Register
(
EShaderPlatform InShaderPlatform |
Builds a list of the shader pipelines in a shader map. | |
| void | Release () |
||
| void | RemovePendingMap
(
FNiagaraShaderMap* Map |
||
| bool | RemovePendingScript
(
FNiagaraShaderScript* Script |
Removes a Script from NiagaraShaderMapsBeingCompiled. | |
| void | RestoreShadersFromMemory
(
const TArray< uint8 >& ShaderData |
Recreates FShaders from the passed in memory, handling shader key changes. | |
| void | Saves this shader map to the derived data cache. | ||
| bool | Serializes the shader map. | ||
| void | SetCompiledSuccessfully
(
bool bSuccess |
||
| bool | 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. |
| AllNiagaraShaderMapsGuard | Guards access to AllNiagaraShaderMaps, which can be written to from an async loading thread. |
| 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. |