Signed distance function

If, further, Γ is a region sufficiently close to the boundary of Ω that f is twice continuously differentiable on it, then there is an explicit formula involving the Weingarten map Wx for the Jacobian of changing variables in terms of the signed distance function and nearest boundary point.

For voxel rendering, a fast algorithm for calculating the SDF in taxicab geometry uses summed-area tables.

[6] Signed distance functions are applied, for example, in real-time rendering,[7] for instance the method of SDF ray marching, and computer vision.

[8][9] SDF has been used to describe object geometry in real-time rendering, usually in a raymarching context, starting in the mid 2000s.

By 2007, Valve is using SDFs to render large pixel-size (or high DPI) smooth fonts with GPU acceleration in its games.

Behdad's GLyphy approximates the font's Bézier curves with arc splines, accelerated by grid-based discretization techniques (which culls too-far-away points) to run in real time.

[11] A modified version of SDF was introduced as a loss function to minimise the error in interpenetration of pixels while rendering multiple objects.

[13] In 2023, the authors of the Zed text editor announced a GPUI framework that draws all UI elements using the GPU at 120 fps.

The graph (bottom, in red) of the signed distance between the points on the xy plane (in blue) and a fixed disk (also represented on top, in gray)
A more complicated set (top) and the graph of its signed distance function (bottom, in red).
Signed distance fields stored as raster images can be used to represent shapes.