⏱ Capsule Public Coding

Ray Marching 3D Scene

Ezarwebmaster· Jul 5, 2026

Brief

# Capsule Brief: Ray Marching 3D Scene ## 1. Why this capsule exists Ray marching with SDFs is one of the highest-signal coding benchmarks available for LLMs because it sits at the intersection of three things a model can't fake with pattern-matching alone: - **3D math correctness** (normal estimation via gradient, camera ray generation, reflection/lighting equations) - **Numerical stability** (step count, epsilon thresholds, banding artifacts if done wrong) - **Performance awareness** (naive per-pixel loops in JS Canvas can be catastrophically slow if the model doesn't reason about ray-march step limits or resolution) Unlike most "impressive-looking" AI-generated demos (particle systems, simple CSS art), a broken ray marcher is immediately, visually obvious even to someone with zero coding background: the scene looks flat, shapes are wrong, shadows don't move, or the browser tab freezes. This makes it an excellent "Benchy-style" capsule — verifiable ground truth without domain expertise. ## 2. Expected spread between models - **Weak/small models:** usually produce a flat-shaded scene with a single sphere, no shadows, no blending, sometimes syntactically broken GLSL/JS that fails silently (blank canvas). - **Mid-tier models:** get the SDF math right for basic shapes and lighting, but skip soft shadows or AO, or produce visible banding/artifacts. - **Frontier models:** correctly implement smooth union blending, soft shadows, AO, and keep frame rate usable — this is where the gap becomes dramatic and immediately visible on the Timeline comparison view. ## 3. Known implementation risks to watch for when grading - Some models fake "3D" with a pre-rendered CSS/SVG trick rather than actual ray marching — check the source code, not just the visual output. - Some models hardcode a static image behind a CSS animation instead of an actual per-frame SDF evaluation — again, verifiable by reading the code. - WebGL context creation can silently fail on some sandboxed viewers; make sure the Timeline run environment actually supports a WebGL canvas before penalizing a model for a blank screen that isn't its fault. --- ## 4. Ground Truth ("Vérité Terrain") A correct implementation must satisfy ALL of the following, checkable by anyone just by looking at the rendered output — no code reading required for the pass/fail call (code reading is only needed for the "did it cheat" check): | # | Ground truth check | How to verify visually | |---|---|---| | GT1 | At least 3 shapes are visually merging into each other with rounded blend seams (not just touching/overlapping as separate hard-edged objects) | Look at the junction between shapes — should look organic/rounded, like melted wax, not a sharp intersection line | | GT2 | A ground plane is visible and shapes appear to sit on it | There's a flat surface below the shapes with correct perspective | | GT3 | Shadows exist and have a soft edge (gradient from dark to light), not a hard binary edge | Zoom into the shadow boundary — should fade, not have a jagged 1px hard line | | GT4 | Some part of the scene is animating (camera orbiting, light moving, or shape morphing) | Just watch it for 3 seconds — something is moving | | GT5 | No blank canvas / no browser console errors on load | Open dev tools console — should be error-free | | GT6 | Runs at usable frame rate (not a slideshow) on a normal laptop | Subjective but obvious — is it smooth-ish or a slideshow? | | GT7 | Ambient occlusion is present in some form | Look at concave junctions between merged shapes — should be slightly darker/shaded, not flat-lit like the rest of the surface | **Pass/fail severity tiers (for the Winners metric):** - **Full pass:** GT1–GT7 all satisfied → top tier - **Partial pass:** GT1, GT2, GT4, GT5 satisfied but shadows are hard-edged (GT3 fail) or no AO (GT7 fail) → mid tier - **Fail:** blank canvas, console errors, or a single flat-shaded non-blended primitive → bottom tier --- ## 5. Scoring Checklist (for the multi-model analysis report) ``` [ ] GT1 - Smooth blending between ≥3 primitives (pass/fail) [ ] GT2 - Ground plane present with correct perspective (pass/fail) [ ] GT3 - Soft shadows with visible penumbra gradient (pass/fail) [ ] GT4 - Scene is animated (camera/light/shape motion) (pass/fail) [ ] GT5 - No console errors, canvas renders on first load (pass/fail) [ ] GT6 - Frame rate subjectively usable, not a slideshow (pass/fail) [ ] GT7 - Ambient occlusion visible at concave junctions (pass/fail) Code integrity check (not part of visual score, but flags a "cheat"): [ ] Confirmed actual per-pixel SDF ray marching in source (not faked with CSS/SVG/pre-rendered image + animation) Final tier: [ Full pass / Partial pass / Fail ] Notes: _______________________________________________ ``` --- ## 6. Reference Asset No reference image needed for this capsule (unlike the perception capsules) — the ground truth is procedural/behavioral, not a fixed answer key. The "reference" is this checklist itself, applied consistently across every model run. Optional: once the first 3–5 runs come in, consider saving a screenshot of the **best-performing run** as a visual reference point in the capsule's metadata, purely for calibration when grading future runs (not as a "correct answer" — outputs will legitimately vary in style).

Locked Reference Prompt

IMMUTABLE

Scientific timeline lock active

Create a single self-contained HTML file that renders a 3D scene using ray marching with signed distance functions (SDF) — no Three.js, no WebGL libraries, no external dependencies. You may use raw Canvas 2D with a per-pixel JS ray marcher, or a raw WebGL context with a hand-written GLSL fragment shader. Either approach is valid. Requirements: 1. The scene must contain at least 3 distinct SDF primitives (e.g. spheres, boxes, toruses) blended together with a smooth minimum (smooth union), so they merge like metaballs rather than just overlapping. 2. Include a ground plane. 3. Implement at least one light source with soft shadows (shadows with penumbra, not just a hard binary shadow ray). 4. Implement basic ambient occlusion (even a cheap approximation based on the SDF is fine). 5. Animate the scene: either the camera orbits around the scene, or the light source moves, or the primitives move/deform over time. Pick at least one. 6. The whole thing must run smoothly in a single HTML file when opened directly in a browser, no build step, no external assets. Output only the final HTML file, fully self-contained.

Add a Benchmark Run

Sign in to run this prompt against hundreds of models with your own OpenRouter key and archive the results.

Timeline (13 runs)

Run Activity

13 runs in the last 6 months

Jan
Feb
Mar
Apr
May
Jun
Jul
LessMore

Cost vs Speed

size = output tokens · top-left is best

1k10k$0.001$0.010$0.10fast · cheapfast · priceyslow · cheapslow · priceyCost per request ($, log)Speed (tokens/sec, log)
size = tokens6.5k26k65k
value frontier — no model is faster & cheaper

Capsule Stats

Runs
13
Total cost
$1.0941
Tokens
164k
Avg latency
1.88 s
Models
12
Web Searches
0
Fastest openai/gpt-5.5-20260423629 ms
Cheapest deepseek/deepseek-v4-flash-20260423$0.0008
Top provider Anthropic×2
41k reasoning last 6d ago
Tip: Select 2 or more runs via their "Compare" buttons — or filter by company below and compare them all at once — then open the Compare Studio: verdicts, benchmark bars, charts, side-by-side reading and response diff.

Benchmark Run — Jul 5, 2026 Latest

Moonshot AI (Kimi)
Moonshot AI (Kimi)kimi-k2.7-code-20260612
moonshotai/kimi-k2.7-codeJul 5, 2026, 03:35:48 PM
Extended
stop
Latency
1.48 s
client → response
Input Tokens
259
prompt tokens
Output
11,915
generated
Total Tokens
12,174
in + out
Billed Cost
$0.0460
OR Credits
Reasoning
9,247
thinking tokens
Model Output
kimi-k2.7-code-20260612 — Canvas
Researcher Notes

Benchmark Run — Jul 5, 2026

Morph
Morphmorph-v3-large
morph/morph-v3-largeJul 5, 2026, 03:33:56 PM
Extended Excluded from Winners
length
Latency
758 ms
client → response
Input Tokens
355
prompt tokens
Output
65,181
generated
Total Tokens
65,536
in + out
Billed Cost
$0.1242
OR Credits
Reasoning
thinking tokens
Model Output
morph-v3-large — Canvas
Researcher Notes

Benchmark Run — Jul 5, 2026

DeepSeek
DeepSeekdeepseek-v4-pro-20260423
deepseek/deepseek-v4-proJul 5, 2026, 03:31:08 PM
Extended
stop
Latency
1.18 s
client → response
Input Tokens
260
prompt tokens
Output
13,932
generated
Total Tokens
14,192
in + out
Billed Cost
$0.0214
OR Credits
Reasoning
9,102
thinking tokens
Model Output
deepseek-v4-pro-20260423 — Canvas
Researcher Notes

Benchmark Run — Jul 5, 2026

MiniMax
MiniMaxminimax-m3-20260531
minimax/minimax-m3Jul 5, 2026, 03:31:00 PM
Extended
stop
Latency
2.92 s
client → response
Input Tokens
423
prompt tokens
Output
6,708
generated
Total Tokens
7,131
in + out
Billed Cost
$0.0081
OR Credits
Reasoning
1,951
thinking tokens
Model Output
minimax-m3-20260531 — Canvas
Researcher Notes

Benchmark Run — Jul 5, 2026

ByteDance
ByteDanceui-tars-1.5-7b
bytedance/ui-tars-1.5-7bJul 5, 2026, 03:29:56 PM
Extended Excluded from Winners
length
Latency
451 ms
client → response
Input Tokens
270
prompt tokens
Output
2,048
generated
Total Tokens
2,318
in + out
Billed Cost
$0.0004
OR Credits
Reasoning
thinking tokens
Model Output
ui-tars-1.5-7b — Canvas
Researcher Notes

Benchmark Run — Jul 5, 2026

Qwen (Alibaba)
Qwen (Alibaba)qwen3.7-max-20260520
qwen/qwen3.7-maxJul 5, 2026, 03:27:14 PM
Extended
stop
Latency
1.61 s
client → response
Input Tokens
269
prompt tokens
Output
4,104
generated
Total Tokens
4,373
in + out
Billed Cost
$0.0157
OR Credits
Reasoning
601
thinking tokens
Model Output
qwen3.7-max-20260520 — Canvas
Researcher Notes

Benchmark Run — Jul 5, 2026

Anthropic
Anthropicclaude-5-fable-20260609
~anthropic/claude-fable-latestJul 5, 2026, 03:25:46 PM
Extended
stop
Latency
3.10 s
client → response
Input Tokens
399
prompt tokens
Output
4,395
generated
Total Tokens
4,794
in + out
Billed Cost
$0.2237
OR Credits
Reasoning
84
thinking tokens
Model Output
claude-5-fable-20260609 — Canvas
Researcher Notes

Benchmark Run — Jul 5, 2026

Google DeepMind
Google DeepMindgemini-3.1-pro-preview-20260219
~google/gemini-pro-latestJul 5, 2026, 03:14:44 PM
Continued
stop
Latency
4.26 s
client → response
Input Tokens
262
prompt tokens
Output
7,133
generated
Total Tokens
7,816
in + out
Billed Cost
$0.0870
OR Credits
Reasoning
3,931
thinking tokens
Model Output
gemini-3.1-pro-preview-20260219 — Canvas
Researcher Notes

Benchmark Run — Jul 5, 2026

OpenAI
OpenAIgpt-5.5-20260423
~openai/gpt-latestJul 5, 2026, 03:11:16 PM
Extended
stop
Latency
629 ms
client → response
Input Tokens
258
prompt tokens
Output
7,276
generated
Total Tokens
7,534
in + out
Billed Cost
$0.2196
OR Credits
Reasoning
3,624
thinking tokens
Model Output
gpt-5.5-20260423 — Canvas
Researcher Notes

Benchmark Run — Jul 5, 2026

OpenAI
OpenAIgpt-5.5-20260423
~openai/gpt-latestJul 5, 2026, 02:54:19 PM
Excluded from Winners
length
Latency
618 ms
client → response
Input Tokens
258
prompt tokens
Output
2,048
generated
Total Tokens
2,306
in + out
Billed Cost
$0.0627
OR Credits
Reasoning
2,048
thinking tokens
Model Output

(No text response)

This reasoning model spent its entire output budget on thinking (2,048 tokens) and hit the limit before writing any answer. Use the retry button by the LENGTH badge to re-run with a higher cap.

Researcher Notes

Benchmark Run — Jul 5, 2026

Google DeepMind
Google DeepMindgemini-3.5-flash-20260519
🎨 Canvas
google/gemini-3.5-flashJul 5, 2026, 01:11:30 PM
Continued
stop
Effort: Medium
Latency
2.75 s
client → response
Input Tokens
329
prompt tokens
Output
21,100
generated
Total Tokens
27,687
in + out
Billed Cost
$0.1998
OR Credits
Reasoning
10,067
thinking tokens
Model Output
gemini-3.5-flash-20260519 — Canvas
Researcher Notes

Benchmark Run — Jul 5, 2026

DeepSeek
DeepSeekdeepseek-v4-flash-20260423
🎨 Canvas
deepseek/deepseek-v4-flashJul 5, 2026, 01:10:52 PM
stop
Latency
2.53 s
client → response
Input Tokens
344
prompt tokens
Output
3,733
generated
Total Tokens
4,077
in + out
Billed Cost
$0.0008
OR Credits
Reasoning
thinking tokens
Model Output
deepseek-v4-flash-20260423 — Canvas
Researcher Notes

Benchmark Run — Jul 5, 2026

Anthropic
Anthropicclaude-4.8-opus-20260528
🎨 Canvas
~anthropic/claude-opus-latestJul 5, 2026, 01:10:32 PM
stop
Latency
2.18 s
client → response
Input Tokens
506
prompt tokens
Output
3,286
generated
Total Tokens
3,792
in + out
Billed Cost
$0.0847
OR Credits
Reasoning
thinking tokens
Model Output
claude-4.8-opus-20260528 — Canvas
Researcher Notes