Skip to main content

Module particles

Module particles 

Source
Expand description

GPU Particle System

Provides fully GPU-accelerated particle simulation and rendering. Particles are simulated using compute shaders and rendered using instanced billboards.

§Architecture

ParticleSystemGpu
       │
       ├── Compute Pass (Simulation)
       │   └── Updates particle positions, velocities, lifetimes
       │
       └── Render Pass (Drawing)
           └── Draws particle billboards as instanced quads

Structs§

GpuEmitter
Emitter configuration for GPU
GpuForce
Force affector for GPU
GpuParticle
GPU particle data structure Must match the WGSL struct layout exactly
GpuRenderUniforms
Render uniforms for vertex/fragment shaders
GpuSimulationUniforms
Simulation uniforms for compute shader
ParticleManager
Manager for multiple particle systems
ParticleSystemGpu
Handle to a GPU particle system
ParticleViewport
Particle viewport data for rendering

Constants§

MAX_PARTICLES_PER_SYSTEM
Maximum particles per system for buffer allocation
PARTICLE_COMPUTE_SHADER
GPU particle compute shader
PARTICLE_RENDER_SHADER
GPU particle render shader (billboard quads)