In short, raymarching is a rendering technique where rays are iteratively marched through a scene, with step size being determined by functions called SDFs.
SDF stands for signed distance function, and it is simply a function defined for a shape that takes in a point, and returns the distance between the shape and the point.
For example, a sphere has an SDF of:
float sphereSDF(vec3 point, Sphere s) {
return length(s.center() - point) - s.radius();
}
Using a raymarching algorithm, any shape that has an SDF can be rendered. This means that certain scenes or objects that would normally be difficult to model with regular meshes can be rendered with minimal extra cost.
Credit: Leslie Stowe