I truly love IQ's page and the information within regarding SDF's:
(https://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm)
I have a few figured out but but his sdPlane is getting me..
float sdPlane( vec3 p, vec4 n )
{
// n must be normalized
return dot(p,n.xyz) + n.w;
}
He doesn't identify what the input 'n' is being used for and I am not the greatest in math.
Something like the Width, Height, Depth from point p, but then n.w doesn't make sense..
Any help will be awesome, Thanks!
n
is a Plane Equation. .xyz
is the normal vector of the plane and .w
is the distance from origin.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With