Particle Life simulation in browser using WebGPU
Published on: 2025-06-22 19:28:12
Particle Life simulation in browser using WebGPU
If you don't care about the explanation and want a direct link to the simulation, here you go.
You might know that I'm a sucker for physics simulations, and particle simulations in particular. Usually I implement something based on conventional physics, but recently I've stumbled upon a funny non-physical model that can display...well, let's call it life-like behavior.
I've made a prototype in C++ using my pet engine, but then I decided it would be fun to try making it run in browser, using the WebGPU API. It works surprisingly well, and can produce fun simulations like this:
In this post I'll describe how it works under the hood.
Contents
The Particle Life Model
There are quite a number of resources (primarily, videos) online that talk about this model, for example this, this, and this, and also this one talks about the exact formulas used in the simulation. Due to a rather pretentious name composed of two overused words, googlin
... Read full article.