Skip to content
Andrew Voirol
Saturday, October 31, 2026vitrail-build

Raytracing through three blocks of glass and scouting loose prisms by ear

WebGPUShadersApple Silicon

Single-surface refraction fell apart the moment two colored prisms crossed behind each other — the back block vanished instead of tinting the light. I upgraded the WebGPU rgba16float pipeline to march primary rays (n = 1.522) through up to two additional interior stained-glass prisms behind the hit face, accumulating Beer-Lambert spectral extinction alongside a 2048×2048 vertex-refracted Snell waterglass caustic map and a 1024×1024 optical-depth PCSS shadow atlas. On the physics side, pulling a block initially made the whole 54-block stack chatter, and tumbled blocks kept jittering on the table. Switching to Froude-invariant (Fr = 1) scaling at 120 Hz dropped 18-row stack sag under 0.15 mm with 54/54 bodies sleeping cleanly, while ~0.09 mm micro-clearance variance lets you tap-test blocks (< 5 px pointer travel): free glass rings at 2.3 kHz and pinned load-bearing columns tick dryly at 3.8 kHz. After a four-year-old friend playtested the build and dictated feedback, I also wired full multi-touch orbit, pinch-zoom, and drag extraction so the whole tower plays natively on an iPad.

← Previous

Seventy-one grams of cathedral glass and 3D Voronoi cleavage

Next →

Replacing web UI panels with a leaded stained-glass lancet window


Andrew Voirol

Builder, hacker, shipper. Currently leaving localhost.

Navigate

WorkThreadsBuilder's LogAboutContactRSS Feed

Connect

X / TwitterGitHubLinkedIn

© 2026 Andrew Voirol·Back to top ↑
✦Just one prompt away from figuring it all out.