Skip to main content

WebGPU-Only Migration Guide

BREAKING CHANGE: As of commit 47782ed (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

  1. Renderer: WebGLRendererWebGPURenderer (always)
  2. Materials: All materials use TSL node materials
  3. Post-processing: Bloom, tone mapping, etc. use TSL-based effects
  4. Fallback code: All WebGL detection and fallback code removed

Browser Compatibility

Supported Browsers

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)
If you’re on macOS 14 or earlier, you must:
  1. Upgrade to macOS 15+, OR
  2. 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)

See scripts/deploy-vast.sh for complete implementation.

Docker Containers

If running in Docker, ensure:
  1. GPU access: Container has access to NVIDIA GPU
  2. Display server: Xvfb or Xorg running inside container
  3. 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:
Or use Xvfb in CI:

Error Messages

”WebGPU is not supported”

Cause: Browser doesn’t support WebGPU or hardware acceleration is disabled. Fix:
  1. Update browser to Chrome 113+, Edge 113+, or Safari 18+
  2. Enable hardware acceleration in browser settings
  3. Update GPU drivers
  4. Check webgpureport.org for compatibility

”Failed to create WebGPU device”

Cause: GPU is blocked or drivers are outdated. Fix:
  1. Update GPU drivers (NVIDIA, AMD, Intel)
  2. Check browser flags: chrome://flags/#enable-unsafe-webgpu
  3. Disable browser extensions that might block WebGPU
  4. 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:
  1. Check GPU access: nvidia-smi
  2. Check DRI devices: ls -la /dev/dri/
  3. Fall back to Xvfb: Xvfb :99 -screen 0 1920x1080x24
  4. Verify Vulkan: vulkaninfo --summary
If you absolutely must use an older version with WebGL support, checkout commit before the breaking change:
Warning: This version is no longer maintained and missing critical features and bug fixes.

Support

If you encounter issues after this migration:
  1. Check browser compatibility at webgpureport.org
  2. Review CLAUDE.md troubleshooting section
  3. Open an issue at github.com/HyperscapeAI/hyperscape/issues
  4. Join our Discord for community support