public sealed class VfxExtractionSystemTurns the scene's VfxEmitters into running, drawn particle systems.
As a system
- Phase
- PreRender
- Reads
- VfxEmitter WorldTransform
- Writes
- VfxHandle
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.
Fields and properties (7)
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 int RunningHow many emitters are running.
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