Risograph spot-ink press

I wanted to see if one live HTML flyer could be separated on the GPU into 2 or 3 subtractive Risograph ink drums, printed onto textured cream paper with stochastic grain and soy-ink overprinting, and shaken out of register on a spring whenever you type or click.

Riso Press // London PRINT #001
RUN 075 SOY INK / 170GSM
240 LPI · 3 DRUMS
starting press...

Type into the headline field, toggle the Spot 1 to 3 buttons, drag the Run count slider or press +1 Impression to knock the ink drums briefly out of register. Drag across the paper sheet or adjust Drum A and Drum B to dial manual misregistration, and toggle the Drum 1 to 3 checkboxes to inspect single stencil masters.

Show the code spot-ink separation shader, ElementGL upload, damped drum spring and geometry sync
  1. One live drawable zine flyer inside the canvas. The text input, spot-density buttons, range slider and stamp button sit inside one <canvas content="drawable" layoutsubtree>.
  2. Subtractive spot-ink separation and Beer-Lambert overprinting. Splits the uploaded texture into grey component plus chromatic excess, converts each drum into ~240 LPI stochastic grain, adds margin crop marks and multiplies soy-ink transmittances over cream Munken paper.
  3. Damped spring misregistration on input and clicks. Every keystroke, slider move or stamp click kicks the drum offsets by 4 to 8 px and settles back to the dial target, stopping the animation loop at rest and skipping bounce when prefers-reduced-motion: reduce is on.
  4. Single ElementGL context, hit sync and fallbacks. Uploads the flyer via texElementSubImage2D(), aligns controls with updateElementGeometry() scaled by geometryUnit(), and falls back to 5-argument 2D drawElementImage() or plain HTML on context loss.

How it works

A Risograph press burns one master stencil per spot ink and feeds each sheet past rotating drums on uncoated paper. Here one ElementGL context from /lib/element-gl.js uploads #poster-card via gl.texElementSubImage2D() on every paint event, and a single WebGL 2 fragment pass simulates two or three drum passes over a cream cotton stock (#f5f0e1).

To separate live HTML into spot plates without pre-authored masks, the shader unpremultiplies the DOM colour, takes cmy = 1.0 - rgb, pulls out the neutral grey component k = min(cmy.r, min(cmy.g, cmy.b)) and leaves chromatic excess chr = cmy - k. Because at least one component of chr is zero, pure magenta, cyan and yellow DOM blocks land cleanly on separate ink drums, while overlapping mix-blend-mode: multiply shapes and dark text print across multiple drums and split into separate colour ghosts when a drum shifts.

Each drum transforms canvas coordinates by its own pixel offset and slight plate angle, thresholds midtones against a rotated ~240 LPI stochastic stipple screen, draws margin registration crosshairs and optional feed-roller tracks, and darkens the paper with pow(inkColor, inkAmount) so Fluorescent Pink and Medium Blue overprint into dark plum. Whenever you type in the headline or press +1 Impression, a damped harmonic spring kicks the drum offsets by 4 to 8 px and relaxes back to the target dials before stopping its requestAnimationFrame loop.

canvas.updateElementGeometry() receives the card's resting rectangle scaled by geometryUnit() from /lib/surface.js (and follows a single isolated drum's offset when only one drum checkbox is checked), followed by toggling posterCard.dataset.hitTick so Chromium clears its hit-test cache. If texElementSubImage2D() isn't available, a 2D canvas fallback draws offset translucent passes with five-argument drawElementImage(); without HTML-in-canvas or on a lost WebGL context, the flyer moves out into #plain-host as plain HTML.

Live checks

These checks wait for a tap so the press opens with one GPU context. Each check runs on its own isolated fixture on the test stage and retires its canvas when done.

Findings