All labs

Lab

Live

Procedural Planet

A planet with no assets — and five different ways to compute it.

A WebGPU planet renderer on a floating-origin coordinate system: terrain, cascaded shadow maps, atmospheric scattering and LOD, all generated. The simulation core is implemented five times over — C++, Rust, Go, C# and Zig — each compiling to WebAssembly behind one interface.

www.proceduralplanet.com (opens in a new tab)
Interchangeable WASM backends
5
CI verification
GPU probe · WGSL parse · visual diff
Coordinate system
Floating origin

Why five backends

The simulation core sits behind a narrow interface, so it can be swapped at build time: `yarn dev:rust`, `yarn dev:go`, `yarn dev:zig`. Same renderer, same output, different language compiled to the same WebAssembly target.

It started as a question — what does each language actually cost you at the WASM boundary, in binary size, in startup, in throughput? — and it turned into the most useful part of the project, because five independent implementations of the same maths is an extremely effective way to find out that your maths was wrong.

Floating origin

At planetary scale, single-precision positions fall apart long before you reach the surface. The world translates around the camera instead of the camera moving through the world, which keeps everything the GPU sees near the origin and precise.

Verification, because renderers lie

  • Visual-regression baselines: capture PNGs, diff every change
  • A GPU capability probe and a WGSL parse check that run in CI
  • Depth-stress runs that hunt precision failures at altitude
  • Per-pass GPU frame-time attribution, so a regression names the pass that caused it

Stack

  • WebGPU
  • WGSL
  • C++/WASM
  • Rust
  • Go
  • C#
  • Zig

More labs

Keep looking

  • Practice between lessons, for band kids.

    Notation and tab that plays back, listens through the microphone, and tells a kid whether they actually hit the note. Built for the gap between weekly lessons — where nearly all the practice happens and nobody is there to correct anything.

    • Next.js
    • VexFlow
    • Tone.js
    • Pitch detection
    • +1

Want the long version?

Happy to go deeper on any of this — architecture, trade-offs, what I would do differently.