Butterfly Meadow: one prompt, one meadow
This morning I gave an agent one long prompt and asked for a meadow. Tonight there is a meadow. You fly through it as a butterfly, and you can see what a butterfly smells. This post covers what I asked for, what came back, and where it fell short.
Every blade, petal, cloud and ridge of bark is generated on the GPU when the page loads. The whole scene is one 213 KB HTML file.
What it is
Butterfly Meadow is a real-time WebGPU scene that runs in a browser tab. At its centre is a giant oak with twisted roots. Tall grass and wildflowers sway in the wind around it, and clouds drift overhead. Other butterflies, insects and birds go about their day. The butterfly’s own senses are drawn on screen: scent, pheromones and ultraviolet patterns appear as glowing particles that swirl in the wind.
It works on desktop, and there are touch controls for phones. Fly it at h0bb3.github.io/butterfly-garden. You need Chrome or Edge with WebGPU. There is also a vertical reel with sound.
The brief
I wanted to know how far a single demanding prompt could go, so the brief was strict on purpose:
- No engines. No Three.js or Babylon.js. WebGPU directly.
- Everything procedural. No texture files, no models. One self-contained HTML file.
- Zero allocations per frame. No garbage-collector stutter.
- A real target. 2560×1440 on an RTX 5070 Ti. At most 11 ms average GPU time, and no frame over 16.7 ms during a scripted 60-second flight.
- A blind critic. A separate agent that sees only the renders, never the code, and reviews until nothing worse than “minor” is left.
The prompt is in the repo, typos and all.
How it was built
The agent wrote the engine core first:
- An HDR pipeline with 4× multisampling
- A baked sky and a sun shadow map
- Bloom and tone mapping done in compute shaders
- A small contract that every part of the scene plugs into
Then it wrote a workflow and handed the world to eight specialist agents running in parallel. Each owned something: the tree, the grass, the flowers, the ground, the rocks, the distant hills, the clouds, the light shafts, the sense particles, the animals. Each one rendered its own part in headless Chrome, looked at the pictures, and fixed what it saw.
Butterfly’s-eye view. The camera spends most of its time down here.
The tools were as interesting as the art. I have no Node.js on this machine, so the agent built around that:
- A Python build script driving a standalone esbuild binary.
- Its own shader minifier, which renames identifiers across every module. Its output was checked pixel for pixel against the readable build.
- Playwright scripts for repeatable screenshots, GPU timing and tracing memory allocations frame by frame.
- A lock file for the GPU. Agents rendering in parallel had been taking turns crashing the graphics driver.

Where it fell short
The honest part: I ran out of patience with the token bill before the agent ran out of ideas. I asked it to wrap up, and not every goal was met.
- The critic never saw the finished scene. Some modules got a critique and a revision before I stopped the loop; some did not.
- Performance is unproven on the target. My machine has a GTX 1070, and there the flight averages 17.5 ms with a worst frame of 23.9 ms. The 5070 Ti should be roughly four times faster, but that is an estimate, not a measurement.
- Allocations are close to zero, not zero. The engine core allocates nothing. The full scene allocates about 220 bytes a frame, most of it inside the browser’s own WebGPU calls.
The README lists what is left and how to finish it. I’d rather say all this than call it done.

After the build
Each of these was one short sentence from me:
- “Push to GitHub and deploy it so I can look from the office.”
- “Make a super nice landing page.” The page uses screenshots rendered by the engine itself.
- “Add mobile controls.” That brought a joystick, drag to look, buttons to rise and dive, and lower resolution on phones.
- “Make a stunning reel.” It is rendered frame by frame by the engine and slowed down, with cross-fades and titles. No screen recording.
- “Don’t bloat the repo with the video.” The reel moved to a GitHub release, and the agent rewrote the history so it was never in the repo.
The world is bounded. Fly too far and the meadow politely turns you around.
What I take with me
A measurable brief works. A frame budget, a file size and a blind critic gave the agent something to aim at beyond “make it pretty”. It also builds its own tools well: the minifier, the benchmark and the capture pipeline came out of the same session as the meadow. Verification is where the cost is. Rendering, critiquing and rendering again at high resolution is what ate the tokens, and next time I will budget for it from the start. And building for a 5070 Ti on a 1070 means every number is a guess until it runs on the real card.
The code is MIT licensed, and the images and reel are CC BY 4.0. Source on GitHub.