<aside> 📌 "Signed distance functions, or SDFs for short, when passed the coordinates of a point in space, return the shortest distance between that point and some surface. The sign of the return value indicates whether the point is inside that surface or outside (hence signed distance function)."

http://jamie-wong.com/2016/07/15/ray-marching-signed-distance-functions/

</aside>

Image source: https://thebookofshaders.com/07/

Related to:

Raymarching

Metaballs

Learning resources

2D:

Section "Distance Field":

2D Signed Distance Field Basics

Inigo Quilez :: fractals, computer graphics, mathematics, shaders, demoscene and more

3D:

Tutorials from Inigo Quilez:

Inigo Quilez :: fractals, computer graphics, mathematics, shaders, demoscene and more

Inigo Quilez :: fractals, computer graphics, mathematics, shaders, demoscene and more

See Raymarching

Technique in action

SDF-2D demo