Hello, i am creating a simple sub graph to have the ability to use the SampleGrad function in shader graph. However i can't figure out how to correctly write the function so there are no errors.
In the Name texbox i have put the following:
CustomSampleGrad
In the Body textbox i have put the following:
float4 CustomSampleGrad(Texture2D tex, SamplerState samp, float2 uv, float2 ddx, float2 ddy)
{
return tex.SampleGrad(samp, uv, ddx, ddy);
}
I get a syntax error however saying unexpected token '(' at line 174.
I am not sure how i should write my function node correctly.