particle_attractor.computeShader
The custom particle update shader for the SIMULATION part, passed to `particles.create { updateShader = ... }` in place of the default. It keeps the default update shader's contract exactly — the same three bindings (`particles`, `vertices`, `params`), a 16-f32 particle stride, a…
particle_attractor
The custom particle update shader for the SIMULATION part, passed to
particles.create { updateShader = ... } in place of the default. It keeps the
default update shader's contract exactly — the same three bindings
(particles, vertices, params), a 16-f32 particle stride, a 23-u32 vertex,
and 4-vertex camera-facing quads — so it is a drop-in replacement.
Physics: each particle springs toward a target point on a shape blended between two parametric shapes, with a tangential swirl field layered on. Shape 0 is a serene human face, sculpted from a gaussian relief mask that sways toward the camera. Shape 4 is the word "OrigoZero" sampled from a 17-stroke vector font of lines and elliptical arcs, cumulative-length weighted so density is even along every stroke. Quads stretch along screen-projected velocity, so moving particles read as comet streaks and settled ones as round sprites.
The user block starts at params[32], which is user param 1:
| Index | User param | Meaning |
|---|---|---|
| 32 | 1 | shape A index |
| 33 | 2 | shape B index |
| 34 | 3 | blend, 0..1 |
| 35 | 4 | spring strength |
| 36 | 5 | swirl strength |
| 37 | 6 | shape scale |
| 38 | 7 | centre x |
| 39 | 8 | centre y |
| 40 | 9 | centre z |
Scoped to this part · feeds back into the world's score.