Skip to content

Particles

Particles in Lumina are GPU simulated. A Particle System asset describes an emitter; the editor compiles its module stack into a compute shader, and the renderer simulates and draws every emitter on the GPU.

Add a Particle System component to an entity and assign the asset.

PropertyMeaning
Particle SystemThe asset that drives this emitter.
OffsetLocal-space offset of the emitter origin relative to the entity transform.
Spawn Rate ScaleScales the asset’s continuous spawn rate. 0 disables spawning, 1 uses the asset value.
Time ScaleScales the simulation time step. Useful for slow motion.
EmittingWhether new particles are spawned. Existing particles keep simulating either way.
Auto BurstFire the asset’s burst count on the first active frame.

The component can also override user parameters declared by the asset, so one asset can serve many variants. Overrides fall back to the asset default, and can be cleared to revert.

Simulation

PropertyMeaning
Max particlesCapacity of the emitter’s particle buffer.
Spawn rateContinuous spawns per second.
Burst countParticles spawned in one burst.
DurationEmitter lifetime. 0 means infinite, used with looping.
LoopingRestart when the duration elapses.

Emitter

Inherit Emitter Velocity blends between world-space spawns (0) and particles flowing with the emitter’s motion (1). It is applied at spawn regardless of which modules are in the stack.

Render

PropertyMeaning
Blend modeAdditive or alpha blended.
TextureThe particle sprite.
Billboard to cameraFace the camera.
Write depthWhether particles write depth. Usually off.

The Particle System editor builds the emitter from a stack of modules: shape, velocity, forces, color over life, size over life, rotation, noise, and so on. The stack compiles into a single compute shader for that emitter, so adding a module costs shader instructions rather than a separate dispatch.

An asset can declare named, typed parameters (float, vector, or color), and a built-in simulation property can be routed through a named parameter. That turns an asset property into something gameplay can drive: bind spawn rate or start color to a parameter, then set that parameter per component from C#.

The component exposes lookups for whether a parameter exists, setting an override, clearing an override, and resolving the effective value (component override first, asset default second).

Simulation and rendering are two passes in the scene renderer, after translucency and fog:

  • Particle Simulate, a compute dispatch per emitter running the compiled module stack.
  • Particle Render, the draw.

Per-emitter GPU and simulation state lives on the render thread inside the render scene, and the game thread publishes a per-frame snapshot of simulation properties after resolving parameter bindings. That means gameplay never touches GPU particle state directly.

See Render Passes for where these sit in the frame.

  • Max particles allocates a buffer per emitter, so a high cap costs memory whether or not the particles exist.
  • Overdraw dominates particle cost. Large, additive, camera-facing sprites filling the screen are far more expensive than a higher particle count of small ones.
  • Every emitter is a separate compute dispatch and draw. Prefer one emitter with a richer module stack over many small emitters producing the same effect.