Troubleshooting

Graphics programming can be tricky. Here are solutions to common problems you might encounter.

1. "RequestAdapterOptions" Error or Panic

⚠️ Error

Error: No suitable adapter found

Cause: WGPU cannot find a GPU that supports the required features (Compute Shaders or Vertex Storage).

Solution:

  • Update your GPU drivers.
  • If on Linux, ensure you have Vulkan drivers installed (`mesa-vulkan-drivers`).
  • This project requires a GPU that supports DirectX 12, Vulkan 1.1+, or Metal 2.0+. Older integrated graphics might fail.

2. Web: Blank Black Screen

Cause: The browser doesn't support WebGPU or it's disabled.

Solution:

  • Use a Chromium-based browser (Chrome, Edge) version 113 or later.
  • On Linux, you may need to launch Chrome with --enable-features=Vulkan,UseSkiaRenderer or enable WebGPU in chrome://flags.
  • Check the browser console (F12) for error messages.

3. CORS Errors (index.html)

⚠️ Error

Access to script at '...' from origin 'null' has been blocked by CORS policy

Cause: You opened index.html directly by double-clicking it (file:// protocol).

Solution: You must serve the files over HTTP. Run python3 -m http.server in the project directory and open http://localhost:8000.

4. WASM Compilation Failed

Cause: Missing toolchain or target.

Solution:

rustup target add wasm32-unknown-unknown
cargo install wasm-pack