Skip to main content

ExperimentalSince v10

GitHub
Loading examplePreparing GPU resources…

Explore a cloud of 32,768 glowing particles. Move the pointer to attract the cloud, change its swirl and cohesion, or pause and reset. Phones use 8,192 particles.

One particles.slang source supplies the compute, vertex and fragment entry points. Workgroups share 64 positions and use an integer atomic to count moving particles. Compute writes the next buffer; rendering reads it directly, without CPU readback. The application imports and registers the experimental Slang compiler and uses its reflection helpers for resource layouts and uniform packing.

WebGPU is required. The simulation test compares several steps with an independent CPU reference. See the Slang API for the supported subset and target limits.