Credits and sources
Inigo Quilez
Almost every distance function on this site is his, and the field as a practical craft largely exists in public because he published it. Twenty years of derivations given away, with the working shown, for free.
2D distance functions is the source for the box, triangle, hexagon, segment, arc, pie and star primitives used in the primitive arsenal and everywhere they appear elsewhere. Where those are reproduced here they are his formulations, not reimplementations.
Specifically, and not exhaustively:
- The polynomial smooth minimum, which the blend radius, figure, cloth and morphing notes all depend on: smooth minimum.
- Domain repetition and the fold, plus the observation that it needs neighbor checks once a shape leaves its cell: repetition of SDFs. That article is also where the repetition note gets the condition right after I first got it wrong.
- Filtering procedural patterns, which is the whole argument of the prefiltering note: filtering procedural textures and filterable procedural checkers.
- Analytic motion blur. He published the solved disc case as Shadertoy shaders in 2014, and the motion blur note is the 2D one worked through: Analytical Motionblur 2D.
- Distance-field gradients returned alongside the distance, which the gradients note is built on: 2D SDFs with gradients.
- Soft shadows, ambient occlusion and the raymarching craft that the lighting material leans on throughout: soft shadows in raymarched SDFs.
Others
- Interleaved gradient noise, used as the dither in nearly every demo here, is Jorge Jimenez's, from his SIGGRAPH 2014 course on next generation post processing.
- Cellular / Voronoi noise behind the shatter note is Steven Worley's, from the 1996 paper that introduced it.
- The ACES filmic tonemapping approximation used across the glow and color demos is Krzysztof Narkowicz's fitted curve, which approximates the Academy Color Encoding System transform.
- The erf approximation in the shadow note is Abramowitz and Stegun 7.1.26.
- Bloch's law, behind the flash note, is A. A. Bloch, 1885, and the modern integration-window numbers come from the vision science that followed it.
- Stepping on twos is traditional animation practice long predating any of this, documented most usefully in Thomas and Johnston's The Illusion of Life.
What is mine
The derivations that are not credited above, the measurements, the failure cases, and the specific numbers for this studio's constraints. Where I have got something wrong and corrected it, the note says so rather than quietly fixing it, because the correction is usually the more useful half.
If something here is yours and is not credited, that is an error and I want to fix it. Tell me and I will.
One email when something new goes up. No newsletter, no schedule, nothing else.
Double opt-in, so watch for a confirmation email. Unsubscribe any time.