The same loop, now in a fragment shader
A raymarched scene, live
Every pixel below runs the loop from the previous demo — march until the distance function returns something smaller than ε, then shade using a normal recovered from the gradient. There is no geometry in this page at all: no vertices, no triangles, no model file. Drag to orbit, then switch to the cost view to see what each pixel actually charged you.
The render
Drag to orbit
Loop parameters
Everything on this panel is a uniform. None of it describes the shapes — it only describes how carefully the ray is allowed to look for them.
The entire scene
Frame rate
—
Render resolution
—
Worst‑case map() calls / frame
—
The same scene at 1920×1080
—
Three sliders, three different kinds of wrong. Drop max steps and the far parts of the scene dissolve first — those rays travel furthest, so they run out of budget before they arrive. Raise ε and surfaces stay put but swell and go soft, because a ray now stops while it is still short of the surface, and the error is proportional to how obliquely it approached. Raise the step multiplier past 1.0 and you get the artefact that looks like nothing else: rays punch into surfaces and the recorded depth is wrong, so the shading tears along exactly the places where the geometry is thin. Meanwhile normal offset h touches none of the marching — it only changes the finite difference used to recover the normal after the hit, so too large smooths detail away and too small fills the image with sampling noise. That is the subject of the next demo.