WebGPU viral dynamics playground built on wgfx and Dear ImGui.
The app runs a CPU double-buffered cellular automata infection model and renders the grid with WGSL. Presets include COVID, Hantavirus, and Black Plague, with sliders for spread probability, mortality, population density, initial cases, disease duration, simulation speed, zoom, and pan.
git clone --recurse-submodules git@github.com:e10b/virus.git
cd virusIf you already cloned without submodules:
git submodule update --init --recursivecmake -S . -B out -DCMAKE_BUILD_TYPE=Release
cmake --build out -j
./out/Appemcmake cmake -S . -B build-web -DCMAKE_BUILD_TYPE=Release
cmake --build build-web -j
python3 -m http.server 8080 -d build-webThen open http://localhost:8080/App.html in a WebGPU-enabled browser.
deps/wgfx: WebGPU, SDL3, GLM, and graphics helpersdeps/imgui: Dear ImGuiexample/: app entry point, SDL context, and viral simulation logicres/: WGSL shader for the viral grid renderer