A live single-image random-dot stereogram. Three.js renders a linear depth pass, and a per-scanline constraint solver turns it into dots.
Look through the screen as if at something behind it, until the two dots above the image become three. Hold that, then let your gaze drift down into the image.
If you naturally cross your eyes instead, tick cross-eyed viewing so depth isn't reversed. Pausing makes the first fusion easier.
Keys: F full screen, N and P step through scenes. On the CPU solver, full screen caps supersampling at 2× to keep the frame rate up.
s(z) = round((1 − μz) · E / (2 − μz))
Here z runs from 0 (far plane) to 1 (nearest).
The WebGPU solver copies the WebGL depth canvas straight into a GPU texture, so nothing is read back to the CPU. It runs three compute passes: separation and hidden-surface checks per pixel in parallel, then linking and colouring with one thread per row, then a parallel downsample. Only the middle pass is sequential.