Navigation
API > API/Plugins > API/Plugins/NiagaraCore > API/Plugins/NiagaraCore/UNiagaraDataInterfaceBase
Description
Override this method to provide parameters to the GPU (SRV / UAV / Constants / etc) The most common usage will be to provide a single structure which is nested with other parameters. The structure would be declared like this BEGIN_SHADER_PARAMETER_STRUCT(FMyShaderParameters, ) SHADER_PARAMETER(float, MyValue) SHADER_PARAMETER_SRV(Buffer
And inside the override BuildShaderParameters you would simple add the structure ShaderParametersBuilder.AddNestedStruct
You should also ensure that AppendCompileHash includes the parameters like this InVisitor->UpdateShaderParameters
When filling the data inside the set function you would ask for parameters using the same structure. Note: This function is only called on the CDO only not the instance
| Name | BuildShaderParameters |
| Type | function |
| Header File | /Engine/Plugins/FX/Niagara/Source/NiagaraCore/Public/NiagaraDataInterfaceBase.h |
| Include Path | #include "NiagaraDataInterfaceBase.h" |
virtual void BuildShaderParameters
(
FNiagaraShaderParametersBuilder & ShaderParametersBuilder
) const