public sealed class VfxCompiledGraphA particle system as the runtime executes it: what makes particles, what they start as, and what happens to them.
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[] SpawnersWhat makes particles.
public VfxOperation[] InitializersWhat a particle starts as, applied once to each new one.
public VfxOperation[] UpdatersWhat happens to it, applied to every live particle every step.
public VfxRenderer? RendererHow it is drawn, or if nothing draws it.
public VfxAttribute AttributesEvery attribute the graph touches. Storage is allocated for exactly these.
public VfxCustomAttribute[] CustomsThe attributes the graph declared for itself, in slot order.
public int CapacityThe most particles that may be alive at once.
public int BytesPerParticleHow many bytes one particle of this graph occupies.
Methods (2)
public int SlotOf(string name)The slot a name was given, or -1 if the graph does not declare it.
public static VfxCompiledGraph Compile(ReadOnlySpan<VfxSpawner> spawners, ReadOnlySpan<VfxOperation> initializers, ReadOnlySpan<VfxOperation> updaters, int capacity, VfxRenderer? renderer = null, ReadOnlySpan<VfxCustomAttribute> customs = default(ReadOnlySpan<VfxCustomAttribute>))Checks a graph and works out what it needs.
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