A simple WGSL shader test program running a fullscreen quad, written in C++, compiled to WASM with Emscripten. Running in the browser, rendering with WebGPU.
For the other demos, see:
- https://github.com/Armchair-Software/webgpu-demo
- https://github.com/Armchair-Software/webgpu-demo2
- https://github.com/Armchair-Software/boids-webgpu-demo
- https://github.com/Armchair-Software/chatgpt-emscripten-demo
This demo just renders a simple full-screen quad, useful for testing shaders. There is a minimal integrated editor for the shader code.
Live demo: https://armchair-software.github.io/webgpu-shader-demo/
This requires Firefox Nightly, or a recent version of Chrome or Chromium, with webgpu and Vulkan support explicitly enabled.
- Emscripten
- CMake
- VectorStorm (included)
- LogStorm (included)
- Emscripten Browser Clipboard (included)
- magic_enum (included)
- dear imgui with the proposed
imgui_impl_emscriptenbackend (included)
The easiest way to assemble everything (including in-tree shader resource assembly) is to use the included build script:
./build.shTo launch a local server and bring up a browser:
./run.shFor manual builds with CMake, and to adjust how the example is run locally, inspect the build.sh and run.sh scripts.
