Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

particle_mesh_instance

Mesh-particle path of the generic GPU particle system. One invocation per particle: it integrates the particle, samples the size/transparency/colour sequences, and writes the particle's world matrix and its shader-data block.

The emitter's source mesh is uploaded once and drawn maxCount times from those matrices, so both the memory this path holds and the work it does each frame are proportional to the particle count and independent of how many vertices the source mesh has.

Bindings (see bindings.yaml): particles (read_write array<f32>, 16 f32 per particle), transforms (read_write array<f32>, 16 f32 per particle — one column-major 4x4), instance_data (read_write array<f32>, 16 f32 per particle — four vec4 lanes), params (read_write array<f32>).

Shader-data lanes, as particle_mesh.shader reads them:

LaneContents
0rgb the particle's colour, tinted and brightened; a its opacity
1(life_t, seed, world size, 1 while alive)

Usage: dispatch by identity with compute.dispatch("@builtin::deprecated.deprecatedParticles.particle_mesh_instance", ...) (buffers in bindings order) — it resolves to the shader's stable guid and auto-compiles on first use.