Navigation
API > API/Plugins > API/Plugins/Niagara > API/Plugins/Niagara/UNiagaraDataInterfaceSkeletalMes-
- UNiagaraDataInterfaceBase::BuildShaderParameters()
- UNiagaraDataInterfaceSkeletalMesh::BuildShaderParameters()
References
| Module | Niagara |
| Header | /Engine/Plugins/FX/Niagara/Source/Niagara/Classes/NiagaraDataInterfaceSkeletalMesh.h |
| Include | #include "NiagaraDataInterfaceSkeletalMesh.h" |
| Source | /Engine/Plugins/FX/Niagara/Source/Niagara/Private/NiagaraDataInterfaceSkeletalMesh.cpp |
virtual void BuildShaderParameters
&40;
FNiagaraShaderParametersBuilder & ShaderParametersBuilder
&41; const
Remarks
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