Browser Platform
SiliconGhetto is a WebGPU-based browser game engine. WebGPU is the default renderer. WebGL2 exists only as an automatic fallback when hardware WebGPU is unavailable or unsuitable.
No URL flag, query parameter, or user setting is required. The engine chooses the correct renderer during initialization.
Minimum Requirements
| Feature | Required | Fallback |
|---|---|---|
| WebAssembly | Yes | None |
| WebGPU | Primary/default renderer | WebGL2 fallback |
| WebGL2 | Required only for fallback | None |
| Web Workers | Yes | Main thread mode |
| OffscreenCanvas | Preferred | Main thread rendering |
| SharedArrayBuffer | Optional | Single-threaded |
Rendering Tiers
Tier 1: WebGPU
| Capability | Requirement | Result |
|---|---|---|
| GPU API | Hardware WebGPU adapter exposed by the browser | Primary renderer |
| Shader path | WGSL through wgpu | Full engine feature path |
| Advanced GPU features | Available according to adapter limits | Highest quality tiers where supported |
Tier 2: WebGL2 Fallback
| Capability | Requirement | Result |
|---|---|---|
| GPU API | WebGL2 context available | Fallback renderer |
| WebGPU state | Unavailable, rejected, or software/fallback adapter | Automatic fallback |
| Feature set | WebGL2-compatible shader and buffer limits | Reduced renderer features |
Not Supported
- Browsers without WebAssembly support
- Browsers without hardware WebGPU or WebGL2 support
Feature Detection
The engine detects GPU capabilities at initialization:
1. Request a WebGPU adapter
- Hardware adapter found: use WebGPU
- No adapter, rejected adapter, or software adapter: use WebGL2 fallback
2. Query device limits and features
3. Configure rendering pipelines from the selected backend
WebGPU Feature Path
These features require WebGPU and are unavailable on WebGL2:
- Compute shaders
- Storage textures
- Timestamp queries for GPU profiling
- Indirect draw calls
WebGL2 Fallback Limits
When running on WebGL2:
- No compute shader support
- Limited texture format support
- No storage buffers
- Some shader features are restricted
Cross-Origin Isolation
SiliconGhetto requires cross-origin isolation headers for full functionality:
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp
Without these headers:
SharedArrayBufferis unavailable- High-resolution timers may be restricted
- Memory measurement APIs are unavailable
All deployment configurations include these headers. See ADR-003.
Mobile Support
Mobile browsers follow the same automatic renderer policy: hardware WebGPU first, WebGL2 fallback only when needed.
Mobile-specific considerations:
- Touch input: Handled via the
sg_inputcrate’s touch abstraction - Screen orientation: Games should handle both portrait and landscape
- GPU thermal throttling: Runtime quality tiers adapt to sustained pressure
- Memory constraints: Mobile devices may use lower asset quality or shorter draw distances
Testing Platform
# Build a demo
wasm-pack build demos/stress-lab --target web --out-dir www/pkg
# Serve with isolation headers
# Open in a target browser and check console diagnostics for backend info
The runtime diagnostics report:
- GPU backend selected by the automatic policy
- Device capabilities
- Frame rate and performance metrics
- Quality tier selection
Known Constraints
- WebGL2 fallback has reduced rendering features compared with WebGPU.
- Software WebGPU adapters are treated as unsuitable for gameplay and fall back to WebGL2 when available.
- Browser GPU support changes over time, so the engine relies on runtime capability detection instead of hard-coded browser lists.