Skip to main content

Module particle_render

Module particle_render 

Source
Expand description

GPU particle rendering bridge — renders particles directly from compute SSBO using indirect draw, with zero CPU readback.

The render pipeline reads from the SSBO that was written by particle_update.comp and draws instanced quads (one per alive particle) using the standard glyph vertex format. The indirect draw buffer’s instance count is written by the compute shader, so the CPU never needs to know how many particles are alive.

Structs§

DepthLayerConfig
Configuration for rendering particles across multiple depth layers.
ParticleRenderConfig
Configuration for GPU particle rendering.
ParticleRenderInstance
Per-particle data extracted from the SSBO for rendering.

Enums§

ParticleLodTier
LOD tier for particle rendering based on camera distance.

Constants§

PARTICLE_FRAG_SRC
Fragment shader for GPU particles.
PARTICLE_VERT_SRC
Vertex shader that reads particle data from SSBO and renders instanced quads.

Functions§

extract_render_instances
Extract render instances from a CPU-side particle buffer.
sort_instances_back_to_front
Sort render instances back-to-front relative to the camera position.