public sealed class VfxGeometryBuilderTurns particles into quads.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The last step before something is drawn, and the last one that is pure arithmetic — what happens to the vertices afterwards belongs to a render feature in Vixen.Rendering, which is where the pipelines and descriptor sets live. Keeping the expansion here means Vixen.Vfx depends on no graphics at all and every one of these decisions can be checked against a number rather than against a screenshot.
Four vertices a particle, not six. The two triangles share an edge, and the index pattern that joins them is the same for every particle in every effect ever — so it is a buffer built once by whoever draws, not two repeated vertices per particle forever. WriteQuadIndices is that pattern.
Fields and properties (6)
public const int VerticesPerParticleHow many vertices one particle needs.
public const int IndicesPerParticleHow many indices one particle needs.
public const int VerticesPerRibbonParticleHow many vertices one particle of a ribbon needs: one each side of the strip.
public const int IndicesPerRibbonSegmentHow many indices one length of ribbon needs — two triangles between two particles.
public ReadOnlySpan<int> OrderThe order the last Build drew the particles in.
public int LastCountHow many particles the last Build wrote.
Methods (4)
public static int WriteQuadIndices(Span<uint> indices, int particles)Writes the index pattern for a number of particles.
public int Build(VfxSystem system, in VfxCamera camera, Span<ParticleVertex> vertices)Expands a system's live particles into quads.
public int BuildInstances(VfxSystem system, in VfxCamera camera, Span<ParticleInstance> instances)Expands a system's live particles into per-instance transforms.
public int BuildRibbons(VfxSystem system, in VfxCamera camera, Span<ParticleVertex> vertices, Span<uint> indices, out int indexCount)Joins the particles of each ribbon into a strip.
Used by (4)
- ParticleRenderFeatureVixen.Rendering
- ParticleRenderFeatureTestsVixen.Rendering.Tests
- VfxGeometryTestsVixen.Vfx.Tests
- VfxRibbonTestsVixen.Vfx.Tests