LookMiddleweight
Raymarched SDF
3D drawn with math alone: blobs, liquid, glass.
A way to draw 3D with math alone: each pixel asks “how far is the nearest surface?” and steps forward until it arrives. Blobs that melt together, liquid, glass and soft shadows come easily. Most “liquid metal” and “blob” shader demos work this way. Heavy on phones at full size.
- Breaks when
- kills mobile GPUs at full reshard to combine with normal meshes
- Also called
- raymarching, ray marching, sphere tracing
Prompts
Merging blobs, brand-colored
A full-screen GLSL raymarcher: four spheres (radii 0.35–0.55) drifting on Lissajous paths, combined with a polynomial smooth-min (k = 0.35). Material: matte mint with a yolk rim (fresnel power 3). One key light at (2, 3, 1) with a soft shadow (penumbra factor 8) onto a floor plane at y = −1, plus ambient occlusion from 5 samples. 64 steps max, early exit at 0.001, render at half resolution and upscale. The pointer moves the light. Fall back to a static PNG when the frame time exceeds 33 ms three times in a row.
Logo carved by booleans
Raymarch a rounded box (1.2 × 0.4 × 0.3, radius 0.06) with the brand letterform subtracted from its front face using an SDF built from capsules and circles (max(box, −letter)). Camera orbits 20° each way. Surface: PBR-ish GGX highlight, roughness 0.3, environment as a two-tone gradient. Show the isolines of the distance field on the floor plane so the field itself is visible.
Combine with real meshes
In Three.js, render a raymarched SDF object on a full-screen quad and write gl_FragDepth from the hit distance so ordinary meshes in the same scene occlude correctly. Show one raymarched blob passing through a MeshStandardMaterial torus. Explain the depth-conversion formula and the cost of writing depth.
Related
Resources · 5
- Distance functionsEvery SDF primitive with GLSL. Paste-ready.iquilezlessite · codeAug 28, 2026
- SeascapeFBM water raymarched in a single fragment shader.TDMsite · code · demoAug 25, 2026
- Painting with Math: raymarching in R3FMaximeHeckelsite · code · demoJul 24, 2026
- three.js example: volumetric cloudmrdoobsite · code · demoJun 15, 2026
- @iquilezlesProfile, not a post. SDF tricks in short clips.iquilezlesXApr 1, 2026