#250

feat(dom): add an opt-in WebGL2 renderer

OpenRaillywants to merge intofrom

Problem

Full-screen redraws are bound by DOM layout: a terminal that changes every cell rebuilds thousands of styled spans per frame, so busy terminals and pages with many panes paint far below the display rate.

Changes

  • renderer: "webgl" (opt-in) paints live output with one instanced WebGL2 draw per frame from a shared glyph atlas. Block elements are drawn procedurally.
  • All terminals on a page share one WebGL2 context and draw into tiles of one canvas, copied out once per frame, so pane grids are not limited by the browser's cap of about 16 live contexts.
  • DOM text stays the source for selection, find and screen readers. It catches up when output goes idle and on pointer or wheel input; selection, search and scrolled history show the DOM text until the next live output.
  • The GPU cursor follows the CSS focus and blink rules. Without WebGL2 the option falls back to "dom".
  • React, Vue and Svelte accept renderer at mount; docs and READMEs updated.
  • On every renderer: strings are encoded straight into the core's input buffer, the window-size query scan jumps to its prefix, and full-size Kitty images paint without pixel copies.

Visual proof

Same output, DOM renderer:

WebGL renderer:

16 panes on WebGL:

Activity

14
vercel[bot]4d ago

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated
wterm ReadyPreview, v0Oct 27, 2026 12:35am UTC
vercel[bot]reviewed4d ago
vercel[bot]reviewed4d ago
vercel[bot]reviewed4d ago
vercel[bot]reviewed4d ago
vercel[bot]reviewed4d ago
vercel[bot]reviewed4d ago
ctatereviewed4d ago