· Claude Fable 5.1 + Claude Code · Same prompt: a raymarched fractal tunnel

Six rounds to light the tunnel walls: Fable 5.1 + Claude Code on a fractal sponge

The same fractal tunnel prompt: Fable 5.1 inside Claude Code, 69 turns, $4.80, six render rounds. Five of them oscillated between overexposure and invisible dust; the sixth swapped in a point light ahead of the camera plus half-Lambert shading, which is what finally fixed walls that went dark at grazing angles.

The interior of a dense fractal tunnel in violet and pink, Menger sponge cavities receding layer by layer, white dust particles scattered through it
Run the demo WebGL · uses your GPU
drag to orbit · scroll to zoom · space to pause · 1/2/3 for palettes Open full screen ↗

The on-screen labels are in Chinese: this is the model's verbatim output from an experiment run in Chinese, and editing it would make the artifact something other than what was measured.

How it was made

Model
Claude Fable 5.1 + Claude Code
us.anthropic.claude-fable-5-1
How
agent loop
Claude Code 2.1.266
Reasoning effort
high
Turns
69
Tool calls
68
Output tokens
59.7k
Wall time
18m 11s
Cost
$4.80
Artifact
664 lines, one file
Error feedback
none

Six render rounds, and the first five trace one curve:

  1. Badly overexposed — the dust haze and the glow term were both too strong.
  2. – 3. Exposure corrected, but now the dust was invisible and the lighting flat.
  3. – 5. Depth and fog strengthened so the dust became “a few bright, most dim”.
  4. Final: switched to a point light ahead of the camera plus half-Lambert shading, which fixed tunnel walls going dark at grazing angles.

Round 6 is worth calling out on its own: “the walls are too dark at grazing angles” is a problem with the lighting model, not with a badly tuned parameter. Five rounds went into adjusting exposure and fog values; only the sixth changed the algorithm. That kind of judgement — this cannot be tuned, it has to be replaced — comes only from looking at the rendered frame repeatedly.

Final numbers: __DEMO_READY=true, __DEMO_ERROR=null, no page, console or request errors; two matching hashes at ?t=7.5&det=1; first frame in 1.8–3.1 seconds and about 1.1 FPS under SwiftShader; the raymarch runs at 50% resolution by default (640×360) at roughly 21 steps per ray; and at t=7.5, t=30 and in live mode mean luminance sits at 0.27–0.35 — neither black nor blown out, with the far end of the tunnel darkening correctly and the dust sparks visible and properly occluded by the fractal.

Implementation: the fractal is a KIFS variant of the Menger sponge (rotate, fold, sort, scale) tiled on a 4-unit period, with a tunnel carved along a curved path driven by simTime; scale, fold offset and rotation all “breathe” slowly over time. The raymarch renders into a HalfFloat target (rgb for colour, a for hit distance); a composite pass upscales it and converts the distance into gl_FragDepthEXT, which is what the million dust points depth-test against — the same approach as the Astra run, at a different density and palette.

A few URL parameters are left exposed for tinkering: rm (raymarch resolution ratio), steps, iter and dust.

Controls: mouse for parallax, scroll to zoom, space to pause, 1/2/3 for palettes (Abyssal Neon, Ember Core, Verdant Circuit), ?t= to freeze the clock.

Same prompt, other runs

three.js r170 is served from this site, so running a demo makes no third-party request. Published by the author as an individual; testing was self-funded and nothing here represents an employer's position.