Files
UnrealEngine/Engine/Plugins/FX/Niagara/Shaders/Private/DataChannel/NiagaraDataInterfaceDataChannelTemplate_Consume.ush
2025-05-18 13:04:45 +08:00

32 lines
782 B
HLSL

// Copyright Epic Games, Inc. All Rights Reserved.
/**
* Template shader code for the Consume function for the NiagaraDataInterfaceDataChannel.
* Contained in it's own shader file to allow reuse between different invocations with different params.
*/
{PerParameterFunctionDefinitions}
void {FunctionSymbol}(bool bInConsume, out bool bOutSuccess, out int OutIndex, {FunctionOutputParameters})
{
//Default outputs in case of failure.
{DefaultOutputsShaderCode}
bOutSuccess = false;
OutIndex = -1;
if(bInConsume)
{
FNDCAccessContext_{ParameterName} Context;
if(Context.InitConsume())
{
bOutSuccess = true;
OutIndex = Context.ReadIndex;
//This is generated in the DI Cpp depending on the function parameters.
{PerFunctionParameterShaderCode}
}
}
}