Skip to content

Armchair-Software/webgpu-demo

Repository files navigation

CI Build

WebGPU Emscripten demo for the Armchair Engine

This is a simple proof of concept, a minimal 3D engine written in C++, compiled to WASM with Emscripten. Running in the browser, rendering with WebGPU.

image

For the next demo (adding GUI with dear imgui and gamepad support), see https://github.com/Armchair-Software/webgpu-demo2.

Live demo

Live demo: https://armchair-software.github.io/webgpu-demo/

This requires Firefox Nightly, or a recent version of Chrome or Chromium, with webgpu and Vulkan support explicitly enabled.

Dependencies

Building

The easiest way to assemble everything (including in-tree shader resource assembly) is to use the included build script:

./build.sh

To launch a local server and bring up a browser:

./run.sh

For manual builds with CMake, and to adjust how the example is run locally, inspect the build.sh and run.sh scripts.