public sealed class VfxExtractionSystemTurns the scene's VfxEmitters into running, drawn particle systems.
As a system
- Phase
- PreRender
- Reads
- VfxEmitter WorldTransform
- Writes
- VfxHandle
- Runs after
- LightExtractionSystem
Remarks
MeshExtractionSystem's shape, and one more job. It reconciles the same way — create for what appeared, destroy for what went, place what stayed — and then does the thing no mesh needs: it steps the simulations. Nothing else in the engine does. ParticleRenderFeature draws whatever it has been handed and never advances it, deliberately, because a renderer that simulated would simulate once per view.
The emitter's transform is the effect's origin. Every opcode that writes a position writes a world-space one, so without this a graph would be nailed to the coordinates its author typed and the same .vxvfx on twenty entities would be twenty identical piles of particles at one point. Origin is read at spawn, so moving an emitter moves where the next particles appear and leaves the live ones where they are — which is what a torch carried across a room does to its smoke.
⚠ In PreRender, after TransformSystem. The order comes from the declared access, exactly as the mesh bridge's does: this reads WorldTransform and that writes it, so an emitter extracted first would spawn a frame behind the entity it is attached to.
⚠ One expansion serves every view, so an emitter must not be in a shadow stage. That is ParticleRenderFeature's constraint rather than this one's, and it is why Stages is a single mask a host sets from the one transparent stage its document declares rather than something derived from what a mesh is extracted into.
⚠ After LightExtractionSystem, and that is not an aesthetic ordering. An effect whose output is Vfx/Output/Light contributes to the very list that system clears and refills, and the two touch no component in common — so nothing but the declared order keeps a shower of sparks from being wiped by the scene's own lamps every frame. See CollectLights.
Fields and properties (13)
public RenderStageMask StagesWhich stages an extracted emitter appears in.
public IVfxEffectSource? EffectsWhere the effect a reference names comes from. Null emits nothing.
public Material? MaterialWhat every emitter is drawn with.
public Material? MeshMaterialWhat an effect authored as a mesh renderer is drawn with.
public IMeshSource? MeshesWhere the geometry a Mesh names comes from.
public GeometryResidency? ResidencyThe shared geometry a mesh effect's instances are drawn out of.
public int MeshVertexLayoutWhich entry of the describer's layout table a mesh effect's pipeline is built from.
public int RunningHow many emitters are running.
public int MeshlessHow many extracted mesh effects have no mesh to instance, and so draw nothing.
public int DroppedHow many mesh effects wanted geometry that did not fit in the buffer.
public int WaitingHow many emitters are waiting for an effect that has not arrived.
public int ParticleCountHow many particles the running emitters hold between them.
public SystemAccess AccessWhat this system reads and writes.
Methods (6)
public VfxExtractionSystem(RenderSystem system, ParticleRenderFeature particles, MaterialRenderFeature materials)Builds the bridge.
public override JobHandle Update(in SystemContext context, JobHandle dependency)Runs the system.
public void Extract(World world, float deltaSeconds)Reconciles the render store with the world, and advances what is running.
public bool Forget(Entity entity)Drops an entity's effect without needing the entity to be alive.
public void Clear()Drops everything, for a world being torn down.
public override void Dispose()
Used by (3)
- ArenaThirdPersonShooter
- VfxExtractionTestsVixen.Rendering.Tests
- WorldRendererVixen.Engine.Renderer