Skip to content

feat: fall back to WebGL 2 in the live 3D pane instead of refusing - #667

Merged
drmrd merged 20 commits into
mainfrom
feat/live-pane-webgl-fallback
Sep 7, 2026
Merged

drmrd merged 20 commits into
mainfrom
feat/live-pane-webgl-fallback

Conversation

@drmrd

@drmrd drmrd commented Sep 7, 2026

Copy link
Copy Markdown
Owner

The live 3D pane now falls back to WebGL 2 instead of refusing browsers without WebGPU. The engine's renderer has auto-fallen back all along (every committed scene baseline is a WebGL 2 render); the gate was UI-side caution, and its stated precondition, live-view pixel coverage in CI, landed with #469 (ADR-0171).

What changed

  • A memoised three-way probe (bridge/react/live-preview-backend.ts: webgpu, webgl2, unsupported) replaces the boolean WebGPU check in BOTH former gates (editor/shell/scene-pane.tsx and bridge/react/scene-canvas.tsx; the second gate is why the diff touches bridge). The probe guards a throwing context request (a privacy extension must not blank the editor) and answers once per page load, since browsers cap live WebGL contexts.
  • Only unsupported refuses, with copy that no longer blames WebGPU. On the WebGL 2 branch the pane shows a dismissible info banner ("The 3D preview is running without WebGPU. Shading and lighting can look slightly different here."), positioned clear of the camera caption and transparent to orbit drags.
  • ADR-0174 records the reversal of the ADR-0004/ADR-0019 deferral and why it is safe now; the debugging-playbook skill entry is updated in the same PR.

Evidence and reviews

Five full red-green-blue cycles plus a sixth for the review's must-fix (the throw guard); rgb:audit clean; 3857 unit tests green; clean-code review's findings all addressed; PR-level audit: approve (its one untracked staleness, the playbook entry, is fixed here; the rest is filed as #666). No e2e file changed: the audit verified the specs that touch the pane are branch-agnostic or gate on a real WebGPU adapter for their own reasons.

Follow-ups filed as #666 (fold the probe into the engine helper, ADR-0019 staleness, e2e coverage of the WebGL 2 branch, the WebGPUSceneView name).

Closes #476

@drmrd
drmrd merged commit c788d0b into main Sep 7, 2026
9 checks passed
@drmrd
drmrd deleted the feat/live-pane-webgl-fallback branch September 7, 2026 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Live 3D preview should fall back to WebGL 2 instead of the unsupported-browser message

1 participant