Vixen
02b45cc4
csharp
public readonly record struct ParticleInstance

One particle's worth of per-instance data, for a mesh renderer.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Three rows, not four. The fourth row of an affine transform is always (0, 0, 0, 1) and uploading it is sixteen bytes an instance to say so. Three float4s is what every instanced renderer uses and what the vertex shader reassembles.

Rows rather than columns because that is the packing that puts the translation in the w lanes, where one dot per axis reconstructs a transformed position. The convention has to be written down somewhere and this is the somewhere.

Fields and properties (4)

  • public Vector4 Row0

    The first row of the world matrix: the x axis, scaled, and the x translation.

  • public Vector4 Row1

    The second.

  • public Vector4 Row2

    The third.

  • public Vector4 Colour

    The particle's colour.

Methods (1)

  • public ParticleInstance(Vector4 Row0, Vector4 Row1, Vector4 Row2, Vector4 Colour)

    One particle's worth of per-instance data, for a mesh renderer.

Used by (3)

  • ParticleRenderFeatureVixen.Rendering
  • VfxGeometryBuilderVixen.Vfx
  • VfxRibbonTestsVixen.Vfx.Tests