A small number of users run WebGL without GPU acceleration (hardware
acceleration disabled, blocklisted driver, or a locked-down machine) and
get a software (SwiftShader) context, which renders the game at ~1fps.
Demand a GPU-accelerated WebGL2 context at game start; if we can't get
one, show a full-screen gate with per-browser instructions for enabling
hardware acceleration / WebGL instead of letting the game crawl.
- initGL() demands failIfMajorPerformanceCaveat AND inspects the renderer
string — Chrome still hands back SwiftShader when acceleration is turned
off in settings (vs. a blocklisted driver). Classifies ok / software /
unsupported.
- GPURenderer throws GLUnavailableError on a non-accelerated context; the
game-start catch shows the gate. The orphaned canvas is cleaned up.
- <webgl-gate> Lit component renders the actionable gate (intentionally
inlined/untranslated — rarely seen, browser-specific troubleshooting).
- Log a gl_init analytics event (status + renderer) every session so we
can size the affected %.
- Unit tests for initGL's ok/software/unsupported branching.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>