Raymarching and SDFs
A list of signed distance functions
# Notes
In
this shadertoy the epsilon used to calculate the normals is 5 times bigger than min_dist
to SDF to stop raymarching (1e-4
and 5e-4
).
# Shadertoys
# Tutorials
- Ray Marching for Dummies video
- Inigo Quilez YouTube channel
# Useful articles and techniques
# Pitfalls
- SDF subtraction doesn’t return the real distance to the resulting object. As well as
max
function in general. See this. If the object being subtracted is fully inside another object, then the distance is correct. Also see this shadertoy by IQ and the article.