At the current state adding structs to the code breaks parsing, especially structs with functions which is the only easy way of adding non-material function "libraries" to the code node in UE4, i.e:
struct Functions
{
float4 SomeLocalFunction(float4 A, float4 B)
{
return lerp(A, B, 0.25);
}
};
void MaterialFunc(
float4 A,
float4 B
out float4 Color)
{
Functions fun;
Color = fun.SomeLocalFunction(A, B);
}
If file contains multiple material functions, structs will be added to all of the code nodes.
At the current state adding structs to the code breaks parsing, especially structs with functions which is the only easy way of adding non-material function "libraries" to the code node in UE4, i.e:
If file contains multiple material functions, structs will be added to all of the code nodes.