WebGPU-Only Migration Guide
BREAKING CHANGE: As of commit47782ed (2026-02-27), Hyperscape requires WebGPU. WebGL is no longer supported.
Why WebGPU-Only?
All Hyperscape materials and post-processing effects use TSL (Three Shading Language), which only works with Three.js’s WebGPU node material pipeline. There is no WebGL fallback path.What Changed
- Renderer:
WebGLRenderer→WebGPURenderer(always) - Materials: All materials use TSL node materials
- Post-processing: Bloom, tone mapping, etc. use TSL-based effects
- Fallback code: All WebGL detection and fallback code removed
Browser Compatibility
Supported Browsers
| Browser | Minimum Version | Notes |
|---|---|---|
| Chrome | 113+ | Recommended, best performance |
| Edge | 113+ | Chromium-based, same as Chrome |
| Safari | 18+ | Requires macOS 15+ |
| Firefox | Nightly only | Behind flag, not recommended |
Check WebGPU Support
Visit webgpureport.org to verify your browser supports WebGPU.Safari 18+ Requirement
Important: Safari 18 requires macOS 15 (Sequoia) or later. Earlier macOS versions cannot run Safari 18.- macOS 14 (Sonoma): Safari 17 (no WebGPU)
- macOS 15 (Sequoia): Safari 18+ (WebGPU supported)
- Upgrade to macOS 15+, OR
- Use Chrome 113+ or Edge 113+
Code Changes
Removed APIs
The following APIs and flags have been removed:Updated APIs
Environment Variables
The following environment variables are ignored (kept for backwards compatibility):URL Parameters
The following URL parameters are ignored:Deployment Changes
Vast.ai Streaming
CRITICAL: Headless mode no longer works. WebGPU requires a display server.Before (Broken)
After (Correct)
scripts/deploy-vast.sh for complete implementation.
Docker Containers
If running in Docker, ensure:-
GPU access: Container has access to NVIDIA GPU
-
Display server: Xvfb or Xorg running inside container
-
Vulkan ICD: NVIDIA Vulkan driver accessible
Testing Changes
Visual Tests
All visual tests now require WebGPU:Headless Testing
Playwright’s headless mode does not support WebGPU. Use headful mode:Error Messages
”WebGPU is not supported”
Cause: Browser doesn’t support WebGPU or hardware acceleration is disabled. Fix:- Update browser to Chrome 113+, Edge 113+, or Safari 18+
- Enable hardware acceleration in browser settings
- Update GPU drivers
- Check webgpureport.org for compatibility
”Failed to create WebGPU device”
Cause: GPU is blocked or drivers are outdated. Fix:- Update GPU drivers (NVIDIA, AMD, Intel)
- Check browser flags:
chrome://flags/#enable-unsafe-webgpu - Disable browser extensions that might block WebGPU
- Try a different browser (Chrome recommended)
“Execution context was destroyed”
Cause: Page navigation or reload during WebGPU initialization. Fix: This is usually transient. The game will retry automatically.”No screens found” (Vast.ai)
Cause: Xorg cannot access GPU or DRI devices. Fix:- Check GPU access:
nvidia-smi - Check DRI devices:
ls -la /dev/dri/ - Fall back to Xvfb:
Xvfb :99 -screen 0 1920x1080x24 - Verify Vulkan:
vulkaninfo --summary
Rollback (Not Recommended)
If you absolutely must use an older version with WebGL support, checkout commit before the breaking change:Support
If you encounter issues after this migration:- Check browser compatibility at webgpureport.org
- Review CLAUDE.md troubleshooting section
- Open an issue at github.com/HyperscapeAI/hyperscape/issues
- Join our Discord for community support
Related Documentation
- CLAUDE.md - WebGPU requirements and troubleshooting
- AGENTS.md - AI assistant WebGPU guidelines
- docs/duel-stack.md - GPU streaming setup
- packages/shared/src/utils/rendering/RendererFactory.ts - Renderer implementation