I'm exploring jit.gen with the distance function of a plane.
The idea suggested for a plane is:
float sdPlane( vec3 p, vec4 n )
// n must be normalized
return dot(p,n.xyz) + n.w;
So in jit.gen I add two branches.
The first is the dot product of a vec3 normalized between -1 to 1. and three components from another vector.
the second branche is the w value (4th component) from the other vector.
I does not give a plane.
Any advice would be appreciated …