snoise_grad returns a float3 that has the gradient in xy and the noise value in z. The current shader-graph function, SimplexNoise2DGradient_float, returns the x component of the gradient as the noise value and ignores the rest. The gradient is useful for a lot of operations, so I would recommend changing the function to:
void SimplexNoise2DGradient_float(float2 input, out float Out, out float2 Grad)
{
float3 all = snoise_grad(input);
Out = all.z;
Grad = all.xy;
}
And change the corresponding subgraph accordingly to outut both a value and a gradient.
Thanks for putting this all together, great package!
snoise_grad returns a float3 that has the gradient in xy and the noise value in z. The current shader-graph function, SimplexNoise2DGradient_float, returns the x component of the gradient as the noise value and ignores the rest. The gradient is useful for a lot of operations, so I would recommend changing the function to:
void SimplexNoise2DGradient_float(float2 input, out float Out, out float2 Grad)
{
float3 all = snoise_grad(input);
Out = all.z;
Grad = all.xy;
}
And change the corresponding subgraph accordingly to outut both a value and a gradient.
Thanks for putting this all together, great package!