SIRDS Workbench

SIRDS Workbench three.js r128 · Thimbleby/Inglis/Witten

A live single-image random-dot stereogram. Three.js renders a linear depth pass, and a per-scanline constraint solver turns it into dots.

Starting…

Viewing

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.

Pipeline

  1. Each scene renders with an override shader that writes view-space depth, normalised to a tight near/far range and packed into 16 bits across R and G.
  2. The target is read back and each row runs the 1994 linking algorithm, centre-out, with optional hidden-surface checks.
  3. Free pixels take seeded noise or a tiled pattern, linked pixels copy their partner, and the row is box-filtered back down.

Separation

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.