Expand description
GPU-accelerated particle system (CPU mock implementation).
Provides a particle emitter, Euler integrator, and depth-sort for alpha-blended rendering. All operations are implemented on the CPU as a reference / fallback backend.
Structs§
- Emitter
Config - Configuration for a point-emitter.
- GpuParticle
- A single particle in the GPU particle system.
- GpuParticle
System - GPU particle system managing emission and integration of many particles.
Functions§
- gpu_
emit_ particles - Spawn
nparticles from the emitter into the system. - gpu_
integrate_ particles - Advance all particles by
dtseconds using symplectic Euler integration. - gpu_
kill_ dead_ particles - Remove particles whose
lifetime <= 0, compacting the particle list. - gpu_
sort_ by_ depth - Sort active particles by depth along
camera_dir(back-to-front) for correct alpha blending. - spawn_
burst - Emit all
nparticles at once (burst emission).