Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

711 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebGPU-Lab

English · 简体中文

Renderer Projects License

Soft bodies falling, colliding, merging and bursting while acting as both occluders and light sources

2D GI. The soft bodies are the occluders and the light sources at once.
Physics and lighting run entirely in compute shaders; no geometry is ever read back to JavaScript.


The projects

WebGPU 2D GI Lab Soft-body PBD, a JFA distance field, and ray-marched global illumination. Physics to final pixel is one continuous GPU data flow.

Implementation notes →
Sword Vortex Raw WebGPU with no framework underneath. One compute pass feeds four render pipelines across a 9.67-second sequence.

Implementation notes →
Flock Field school simulation and single-fish biomimetic locomotion shown side by side From one curvature-driven fish to 131,072 boids. The split view pairs the single-fish locomotion lab with the GPU school simulation, whose neighbourhood index is rebuilt every frame by a five-pass counting sort.

Implementation notes → · Single fish lab →
WebGPU Mimic A creature with no rig, no skeleton and no baked animation. Every limb is a Bézier curve rewritten into mesh buffers each frame.

Implementation notes →
The same complete plowing run shown as a continuous snow surface and as the active-tile grid debug view Snow as a GPU heightfield rather than millions of particles. The blade moves mass across 384 × 384 cells; the split view follows the complete run through both the final surface and the live active-tile grid.

Implementation notes →
WebGPU Grass Lab Two million blades on a 440 m field. Compute culls 3,025 chunks and hands off between three LOD tiers without ever cross-fading.

Implementation notes →
Deep Haul A 96³ density field you can dig through. Marching Cubes appends straight into the vertex buffer the draw call reads, so nothing is read back.

Implementation notes →

All seven need a WebGPU-capable browser: Chrome or Edge 113+, or Safari 26+.

Performance numbers in these repositories come from recorded measurements, never estimates. That includes the ones that came back neutral, which are written up the same way as the wins.

Repository layout

Each project stays an independent application under apps/, with its own package.json, lockfile, build output, tests, and deployment configuration. The root repository orchestrates them but does not hoist or unify dependency versions.

Rendering code stays with the application that owns it. Helpers shared by pages inside one project live in that project's src/shared/ directory; the root does not impose a common rendering framework on these independent experiments.

List all projects and their available npm scripts:

npm run apps:list

Install, build, or test one project:

npm run apps:install -- flock-field
npm run apps:build -- flock-field
npm run apps:test -- sword-vortex

Omit the project ID to process all projects sequentially:

npm run apps:install
npm run apps:build
npm run apps:test

Run any project-specific script without changing directories:

npm run apps:run -- mimic verify:simulation
npm run apps:run -- snowplow build:cloudflare

All projects use their existing Cloudflare/Wrangler deployment paths. Run hosting commands from the corresponding app boundary so deployments remain independent.

Art asset notice

Visual assets are used for demonstration purposes only. This repository makes no claim of authorship or ownership over third-party artwork.

License

MIT. Each project carries its own LICENSE file.

About

History-preserving WebGPU experiments monorepo

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages