Vixen
02b45cc4
csharp
public static class ParticleLights

A particle system's particles, as lights for the lighting pass.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The renderer that submits nothing to draw. The other three turn particles into geometry; this one turns them into RenderLights and hands them to whatever is collecting lights this frame — ForwardLightingRenderFeature.Lights, in the pipeline as it stands. A shower of sparks that lights the wall behind it is the case, and it is the one thing an additive quad cannot fake: the quad brightens the sparks, not the wall.

Here rather than in Vixen.Vfx because RenderLight is here. The particle runtime knows what a light-emitting particle is — that is Light and the two numbers beside it — and knows nothing about how this renderer represents one. The same split as VfxGpuSimulation: the decision stays in the runtime and the translation lives where the type does.

A budget, not a promise. A light costs every fragment it reaches in every pass that shades one, so a thousand of them is not an effect but an outage. The caller says how many it will accept and gets that many, in buffer order, with the rest reported rather than logged — the same shape as LastRefused, and for the same reason: a system at its budget is normal for a deliberate effect and a mistake for an accidental one, and only the author can tell which.

Methods (1)

  • public static int Collect(VfxSystem system, IList<RenderLight> lights, int maximum = 2147483647)

    Appends a system's particles to a light list.

Used by (1)

  • ParticleLightTestsVixen.Rendering.Tests