Vixen
02b45cc4
csharp
public readonly record struct VfxRenderer

How a system's particles are turned into geometry.

Read the guide page for this →

Remarks

Part of the compiled graph, and it declares the attributes it reads the same way an operation does — so a velocity-aligned billboard is what makes a graph allocate velocity even if nothing in the simulation would have.

Fields and properties (11)

  • public VfxRendererKind Kind

    What each particle is drawn as.

  • public VfxBillboardAlignment Alignment

    Which way it faces, for a billboard.

  • public VfxSortMode Sort

    What order they are drawn in.

  • public Vector3 Axis

    The axis for FixedAxis.

  • public float Stretch

    For Velocity: how much a metre per second of speed lengthens the quad, over and above its size.

  • public int RibbonSlot

    For Ribbon: which custom attribute holds the strip a particle belongs to. Particles sharing a value are one ribbon, ordered by age.

  • public float Intensity

    For Light: how bright one particle is, multiplied by the alpha of its colour. Alpha rather than a second attribute, so that a colour-over-life fade dims the light it is fading — which is what an author who wrote that fade meant.

  • public float Range

    For Light: how far a particle of unit size reaches, in metres. Scaled by size, so a size-over-life curve shrinks the pool of light with the spark.

  • public static VfxRenderer Billboard

    A camera-facing quad, unsorted. What an additive effect wants.

  • public static VfxRenderer SortedBillboard

    A camera-facing quad, sorted back to front. What an alpha-blended effect wants.

  • public VfxAttribute Reads

    The attributes it needs in order to draw anything.

Methods (5)

  • public VfxRenderer(VfxRendererKind Kind = Billboard, VfxBillboardAlignment Alignment = Camera, VfxSortMode Sort = None, Vector3 Axis = default(Vector3), float Stretch = 0, int RibbonSlot = 0, float Intensity = 1, float Range = 4)

    How a system's particles are turned into geometry.

  • public static VfxRenderer Streak(float stretch = 0.1)

    A quad stretched along its velocity.

  • public static VfxRenderer Instanced(VfxBillboardAlignment alignment = Camera, Vector3 axis = default(Vector3))

    An instance of a mesh per particle, oriented by its alignment.

  • public static VfxRenderer Ribbon(int slot)

    A strip through the particles that share a value in one custom attribute.

  • public static VfxRenderer Light(float intensity = 1, float range = 4)

    A point light per particle, coloured and ranged by the particle.

Used by (17)

  • ParticleLightTestsVixen.Rendering.Tests
  • ParticleLightsVixen.Rendering
  • ParticleRenderFeatureVixen.Rendering
  • ParticleRenderFeatureTestsVixen.Rendering.Tests
  • ParticleSpriteDeviceTestsVixen.Graphics.Golden.Tests
  • SourceVixen.Rendering.Tests
  • VfxCompiledGraphVixen.Vfx
  • VfxEffectContentTestsVixen.Rendering.Tests
  • VfxGeometryBuilderVixen.Vfx
  • VfxGeometryTestsVixen.Vfx.Tests
  • VfxRendererRowVixen.Rendering
  • VfxRibbonTestsVixen.Vfx.Tests
  • BillboardOutputNodeVixen.Editor.VfxGraph
  • EffectNodeVixen.Editor.VfxGraph
  • LightOutputNodeVixen.Editor.VfxGraph
  • VfxGraphBuilderVixen.Editor.VfxGraph
  • VfxGraphCompilerTestsVixen.Editor.VfxGraph.Tests