Closest point on triangle (a,b,c) to query point p, with squared distance.
Direct TS port of the WGSL routine in sdf_bake.wgsl (Ericson "Real-Time
Collision Detection" §5.1.5). Kept in lockstep with the shader so the CPU
helper can act as an oracle in tests.
Closest point on triangle (a,b,c) to query point p, with squared distance.
Direct TS port of the WGSL routine in
sdf_bake.wgsl(Ericson "Real-Time Collision Detection" §5.1.5). Kept in lockstep with the shader so the CPU helper can act as an oracle in tests.