Panavision 2.39:1 anamorphic streak & oval bokeh

I wanted to know if one ElementGL WebGL 2 canvas could recreate Panavision 2.39:1 anamorphic squeeze and desqueeze, horizontal cyan-cobalt streak flares, oval bokeh defocus and edge barrel breathe straight from glowing HTML buttons, an editable timecode field and a draggable light puck. Drag the bright puck across the frame, type in the slugline or toggle Ignite flare and Spotlamp.

2.39:1 ANA REC
PANAVISION C 50MM T2.0
FLARE ON · T2.0

Starting canvas…

Show the code cinema HUD markup, squeeze layout, bright-pass and 21-tap streak shaders, FBO pipeline and hit-box sync
  1. One live cinema HUD panel inside the canvas. Bright specular buttons, callouts, the editable slugline and the draggable light puck live inside one <canvas content="drawable" layoutsubtree>.
  2. Squeeze and desqueeze gate dimensions. computeGateRect() scales the projected width from a raw 1.33x gate up to 2.39:1 widescreen while keeping the mobile phone frame inside bounds.
  3. Bright-pass threshold, 21-tap horizontal streak and oval bokeh shaders. Extracts luminance above uThreshold from the uploaded DOM texture, applies cyan-cobalt horizontal convolution with warm internal ghosts, adds 32-tap Vogel-disc elliptical bokeh and warps outer corners with edge barrel breathe.
  4. Multi-pass FBO pipeline on one ElementGL context. Calls stage.begin() before stage.upload(), writes four small RGBA8 FBO passes and composites onto the cinema frame.
  5. Anamorphic hit-box calibration. Measures geometryUnit(), calls updateElementGeometry() with the active squeeze/desqueeze scale and toggles dataset.hitTick so controls stay clickable.
  6. Five-argument 2D and plain-HTML fallbacks. Draws the panel with five-argument drawElementImage() without WebGL 2, or moves the HUD into plain HTML on context loss.

How it works

Every widget inside #cinema-panel sits on a dark matte obsidian ground (#070a10) with muted slate chrome kept below the default 0.54 extraction threshold. Only the glowing buttons, bright callout pills, editable slugline text and the movable SPOT puck cross into high luminance. When you drag the puck, toggle Ignite flare or type a new timecode, Chrome fires a paint event on #flare-canvas. The handler sets hasPainted = true, calls stage.begin() first and uploads #cinema-panel via gl.texElementSubImage2D() with UNPACK_PREMULTIPLY_ALPHA_WEBGL set to true.

Four offscreen 320 by 180 RGBA8 passes run on that single ElementGL WebGL 2 context before the full-resolution composite:

  1. Bright-pass extraction: unpremultiplies the DOM texture, filters pixels above uThreshold inside the warped gate and ignores the dark matte HUD chrome.
  2. Horizontal streak convolution: runs two 21-tap horizontal passes across the full stage width with exponential falloff, Panavision cyan-cobalt tinting and a point-reflected warm amber lens ghost.
  3. Oval bokeh defocus: samples a 32-tap Vogel-disc elliptical aperture kernel stretched vertically in 2.39:1 Desqueeze, compressed in 1.33x Squeeze (raw) and circular in Flat.
  4. Widescreen cinema composite: draws the warped DOM panel inside the dark letterbox frame with subtle corner barrel breathe and lateral chromatic shift, then adds the horizontal streak and oval bokeh across the full viewport.

Because WebGL texture draws don't move Chromium's hit boxes when the card squeezes or widens between 1.33x and 2.39:1, syncPanelGeometry() scales canvas.updateElementGeometry() by geometryUnit() and toggles dataset.hitTick. Centering the barrel warp curve around normalised radius squared 0.35 curves the outer frame corners while keeping buttons and the editable input within about 1 to 2 px of their affine hit boxes.

Live checks

These checks run on isolated fixtures on testStage() when you press the button, leaving the cinema frame above untouched.

ResultExperimentDetail

Findings

Measured in headless Chrome 160 Canary (2026-11-27): 5 of 5 live checks pass. Chrome 159 on Android is not verified yet.