Dither Waves

A test page for a 1-bit dithered header, after the one on Armin Ronacher's blog. His runs a looping ocean video through a WebGL threshold shader; this one draws the ocean procedurally in the same shader, or dithers a video you pick below. One of the experiments in the Lab.

How it works: every frame the shader works out a gray value per cell (from the procedural ocean or the video frame), fades it out toward the bottom so the page shows through, and compares it with a threshold from a repeating pattern. Above the threshold the cell is ink, below it's transparent. Add ?mode=0..3, &scale=1..8 or &ink=33ff66 to the URL to start with other settings.