Pixel sparkle ink ripple across live cards

I wanted to see if one ElementGL WebGL 2 canvas could render Pixel sparkle ink ripples across live Material cards without overflow: hidden boundaries getting in the way. Tap any button, switch, field or gap to burst up to four overlapping waves that light up DOM borders sampled from texElementSubImage2D().

Pixel Surface VIOLET · LIVE

Quantum Ink

Playing · 48 kHz spatial

Starting canvas…

Show the code drawable Material surface, 4-ripple uniform packer, quantum sparkle shader, hit-box sync and 2D fallback
  1. One drawable Material surface inside a single canvas. Every chip, button, switch and editable <input> lives inside #sr-surface with no overflow: hidden box trapping ripples inside individual cards.
  2. Four-slot concurrent ripple packer. launchRipple(), stepRipples() and packRippleUniforms() accept explicit millisecond timestamps and pack up to four concurrent origins, progresses and fade envelopes into vec4[4] uniform arrays.
  3. Turbulent perimeter, edge-glow and quantum sparkle shader. Computes luminance gradients across neighbouring texels of uTex, perturbs the expanding radius with layered value noise, scatters flickering sub-pixel stars and shifts R/B channels along the wave crest.
  4. Premultiplied ElementGL upload gated on paint. Sets UNPACK_PREMULTIPLY_ALPHA_WEBGL to true on creation and restore, calls stage.begin() before stage.upload(surfaceEl) and updates only uniforms while waves animate.
  5. Hit-box sync with geometryUnit(). Calls canvas.updateElementGeometry() scaled by geometryUnit() and toggles dataset.hitTick so clicks and text selection pass through to live DOM controls.
  6. Five-argument 2D and plain-HTML fallbacks. Draws #sr-surface via five-argument drawElementImage() with a radial 2D ripple overlay when WebGL 2 is absent, or moves the surface into #plain-host on context loss.

How it works

A standard CSS ripple uses a pseudo-element inside a container with overflow: hidden, so the wave stops dead at each button's border and can't read neighbouring pixels. Putting all cards inside one <canvas content="drawable" layoutsubtree> flips that around.

Live checks

Each check builds an isolated fixture on testStage() and retires its canvas when finished. The visible demo above isn't touched.

ResultExperimentDetail

Findings

Measured in headless Chrome 160.0.0.0 canary on 2026-11-27 at 412 px wide and 2.625 DPR (SwiftShader WebGL). Chromium 157, npm run check:jank and Chrome 159 on Android are not verified.