Vixen
02b45cc4
csharp
public sealed class VfxCompiledGraph

A particle system as the runtime executes it: what makes particles, what they start as, and what happens to them.

Read the guide page for this →

Remarks

This is the artefact both backends read, and it is data. Not a delegate tree, which a shader cannot be compiled from; not shader source, which a CPU cannot run; not an object graph, which neither can be uploaded. An array of fixed-size operations can be walked by a loop, emitted as shader source, written to disk, and compared for equality — and doc 06 says this is the part that has to be designed in rather than retrofitted, so it is the part that was designed first.

Storage is derived, not declared. Attributes is the union of what the operations touch, computed here. An author cannot forget to declare an attribute and cannot declare one nothing uses, because there is nowhere to say either.

Reading something nothing writes is refused at compile time. An updater that reads velocity in a graph whose initializers never set it would run over zeroed memory and look like an effect that does nothing — the worst kind of failure, because it has no symptom to search for. Compile says so instead.

Fields and properties (8)

  • public VfxSpawner[] Spawners

    What makes particles.

  • public VfxOperation[] Initializers

    What a particle starts as, applied once to each new one.

  • public VfxOperation[] Updaters

    What happens to it, applied to every live particle every step.

  • public VfxRenderer? Renderer

    How it is drawn, or if nothing draws it.

  • public VfxAttribute Attributes

    Every attribute the graph touches. Storage is allocated for exactly these.

  • public VfxCustomAttribute[] Customs

    The attributes the graph declared for itself, in slot order.

  • public int Capacity

    The most particles that may be alive at once.

  • public int BytesPerParticle

    How many bytes one particle of this graph occupies.

Methods (2)

Used by (36)

  • SweepBenchmarksVixen.Benchmarks.Vfx
  • AssetVfxEffectSourceVixen.Engine.Renderer
  • EntryVixen.Engine.Renderer
  • IVfxEffectSourceVixen.Rendering
  • ParticleLightTestsVixen.Rendering.Tests
  • ParticleLightsVixen.Rendering
  • ParticleRenderFeatureVixen.Rendering
  • ParticleRenderFeatureTestsVixen.Rendering.Tests
  • ParticleSpriteDeviceTestsVixen.Graphics.Golden.Tests
  • SourceVixen.Rendering.Tests
  • VfxAgreementTestsVixen.Vfx.Gpu.Tests
  • VfxCollisionTestsVixen.Vfx.Tests
  • VfxCompiledGraphTestsVixen.Vfx.Tests
  • VfxCustomAttributeTestsVixen.Vfx.Tests
  • VfxEffectContentVixen.Rendering
  • VfxEffectContentTestsVixen.Rendering.Tests
  • VfxExtractionSystemVixen.Rendering
  • VfxForceTestsVixen.Vfx.Tests
  • VfxGeometryBuilderVixen.Vfx
  • VfxGeometryTestsVixen.Vfx.Tests
  • VfxParallelTestsVixen.Vfx.Tests
  • VfxReapTestsVixen.Vfx.Gpu.Tests
  • VfxRibbonTestsVixen.Vfx.Tests
  • VfxShaderEmitterVixen.Vfx
  • VfxShaderEmitterTestsVixen.Vfx.Tests
  • VfxShaderUniformTestsVixen.Vfx.Tests
  • VfxSortTestsVixen.Vfx.Gpu.Tests
  • VfxSubEmitterVixen.Vfx
  • VfxSubEmitterTestsVixen.Vfx.Tests
  • VfxSystemVixen.Vfx
  • VfxSystemTestsVixen.Vfx.Tests
  • VfxGraphArtefactVixen.Editor.VfxGraph
  • VfxGraphCompilerVixen.Editor.VfxGraph
  • VfxGraphCompilerTestsVixen.Editor.VfxGraph.Tests
  • VfxGraphViewVixen.Editor.AssetEditors
  • VfxPreviewViewVixen.Editor.AssetEditors