← back to the fireworks

THE BINDING OF ISAAC: RAYTRACED

A small Isaac clone where every pixel is a ray: six floors, three tilesets, eleven kinds of monster, twenty-two items, five bosses and Mom at the bottom. One fragment shader traces the whole basement in real time: a primary ray, a shadow ray to a random point on each of three area lights, contact occlusion from every sphere and a random bounce, and reflection chains that bounce up to three times off the wet floor, the damp bricks, the chrome skirting and the disco ball. The reflections are lit and shadowed like the real thing. Every frame is one noisy sample, like a path tracer; a second pass averages the frames where nothing moves, so the still room settles into clean soft shadows while whatever moves is wrapped in grain. No engine, no library, no triangles. Just spheres, boxes, tears and a mirror ball.

Your browser does not support WebGL2. Isaac is sad about it.

THE BINDING OF ISAAC

RAYTRACED · SIX FLOORS DOWN

WASD move · arrow keys shoot · P pause
touch: left thumb moves · right thumb shoots
clear the rooms, grab the items, beat the boss, take the trapdoor.
the skull door is the boss. Mom is at the bottom.

warming up the GPU…

How it works: the scene is rebuilt every frame as a list of up to 220 spheres and 110 boxes (Isaac, tears, flies, gapers, spiders, hosts, rocks, poop, whichever boss, Mom's foot, the mirror ball) packed into one float texture. For every pixel the shader shoots a primary ray against all of it, then a shadow ray toward a random point on each of the three lights (the penumbrae are sampled, not formulas), sums sphere occlusion for contact shadows and shoots one random occlusion ray, and follows a reflection chain: the floor, the damp walls and every chrome surface bounce the ray again, up to three times, and the first reflected surface gets the full three-light shading so Isaac's reflection carries his own shadow. The disco ball is a mirror sphere whose normal snaps to 48×24 tiles; the lamp's reflection off each tile is projected back onto the room as the moving spots. The lights are sampled, not formulas: each frame picks one random point on every light, one random bounce for the occlusion and a random scatter for the rough tiles, so a single frame is grainy the way a path tracer is grainy. An accumulation pass keeps a running average per pixel (up to 48 samples) and restarts it wherever the new frame disagrees with the old picture, so the still room converges and the moving things stay noisy. Resolution adapts to keep 60 fps. Sound is off until you turn it on.

The run: Basement I and II, Caves I and II, Depths I and II. Each floor has a treasure room, a boss behind the skull door (Monstro, the Duke of Flies, Larry Jr., Gurdy, Monstro II, Mom) and a trapdoor under the boss. Enemies drop half hearts, hearts and the odd soul heart. Tears up. Not affiliated with Edmund McMillen or Nicalis; this is a fan's over-engineered homage. The rest of the site is somehow louder.