Navigation
API > API/Plugins > API/Plugins/NiagaraShader
References
| Module | NiagaraShader |
| Header | /Engine/Plugins/FX/Niagara/Source/NiagaraShader/Public/NiagaraShared.h |
| Include | #include "NiagaraShared.h" |
Syntax
class FNiagaraShaderScript
Remarks
FNiagaraShaderScript represents a Niagara script to the shader compilation process
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Minimal initialization constructor. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
| Destructor |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddCompileId
(
uint32 Id |
||
| void | AddReferencedObjects
(
FReferenceCollector& Collector |
||
| void | BuildScriptParametersMetadata
(
const FNiagaraShaderScriptParametersMetadata& ScriptParametersMetadata |
||
| bool | CacheShaders
(
const FNiagaraShaderMapId& ShaderMapId, |
Caches the shaders for this script with no static parameters on the given platform. | |
| bool | CacheShaders
(
bool bApplyCompletedShaderMapForRendering, |
Caches the shaders for this script with no static parameters on the given platform. | |
| void | Cancels all outstanding compilation jobs | ||
| void | |||
| void | Blocks until compilation has completed. Returns immediately if a compilation is not outstanding. | ||
| FNiagaraCompileHash | |||
| UNiagaraScriptBase * | |||
| const UNiagaraScriptBase * | |||
| const TArray< FString > & | Accessors. | ||
| void | GetDependentShaderTypes
(
EShaderPlatform Platform, |
||
| ERHIFeatureLevel::Type | |||
| const FString & | |||
| FNiagaraShaderMap * | |||
| int32 | |||
| int32 | |||
| FName | Returns owner name for tracking | ||
| bool | GetScriptHLSLSource
(
FString& OutSource |
Get user source code for the shader | |
| TSharedRef< FNiagaraShaderScriptParametersMetadata > | |||
| const FNiagaraShaderScriptParametersMetadata & | |||
| FNiagaraShaderRef | GetShader
(
int32 PermutationId |
||
| FNiagaraShaderRef | GetShaderGameThread
(
int32 PermutationId |
||
| void | GetShaderMapId
(
EShaderPlatform Platform, |
||
| void | GetShaderMapIDsWithUnfinishedCompilation
(
TArray< int32 >& ShaderMapIds |
Fills the passed array with IDs of shader maps unfinished compilation jobs. | |
| EShaderPlatform | |||
| bool | |||
| void | Invalidate () |
||
| bool | Checks if the compilation for this shader is finished | ||
| bool | IsExternalConstantBufferUsed_RenderThread
(
int32 Index |
||
| bool | IsPersistent () |
Should shaders compiled for this script be saved to disk? | |
| bool | IsSame
(
const FNiagaraShaderMapId& InId |
||
| bool | |||
| bool | |||
| bool | |||
| bool | MatchesScript
(
ERHIFeatureLevel::Type InFeatureLevel, |
||
| void | ModifyCompilationEnvironment
(
EShaderPlatform Platform, |
Allow Niagara script the opportunity to modify the compilation environment for GPU simulations. | |
| void | Called when compilation finishes, after the GameThreadShaderMap is set and the render command to set the RenderThreadShaderMap is queued | ||
| FOnNiagaraScriptCompilationComplete & | |||
| bool | QueueForRelease
(
FThreadSafeBool& Fence |
||
| void | Releases this script's shader map. | ||
| void | RemoveOutstandingCompileId
(
const int32 OldOutstandingCompileShaderMapId |
||
| void | SaveShaderStableKeys
(
EShaderPlatform TargetShaderPlatform, |
Save "stable" shader for identifying the shader in the recorded PSO cache. | |
| void | SerializeShaderMap
(
FArchive& Ar |
Serializes the script. | |
| void | SetCompileErrors
(
const TArray< FString >& InCompileErrors |
||
| void | SetCompileErrors
(
TArray< FString >& InErrors |
||
| void | SetFeatureLevel
(
ERHIFeatureLevel::Type InFeatureLevel |
||
| void | SetGameThreadShaderMap
(
FNiagaraShaderMap* InShaderMap |
Note: SetRenderingThreadShaderMap must also be called with the same value, but from the rendering thread. | |
| void | SetHlslOutput
(
const FString& InHlslOutput |
||
| void | SetRenderingThreadShaderMap
(
FNiagaraShaderMap* InShaderMap |
Note: SetGameThreadShaderMap must also be called with the same value, but from the game thread. | |
| void | SetRenderThreadCachedData
(
const FNiagaraShaderMapCachedData& CachedData |
||
| void | SetScript
(
UNiagaraScriptBase* InScript, |
||
| void | SetShaderMap
(
FNiagaraShaderMap* InShaderMap |
||
| void | SetSourceName
(
FString InSourceName |
||
| bool | ShouldCache
(
EShaderPlatform Platform, |
Should the shader for this script with the given platform, shader type and vertex factory type combination be compiled | |
| void | |||
| void | UpdateCachedData_PostCompile
(
bool bCalledFromSerialize |
||
| void |