Vixen
02b45cc4
csharp
public readonly record struct GrassBlade

One blade of grass, as the scatter produces it.

Read the guide page for this →

Remarks

⚠ A blade is not a FoliageInstance plus nothing. The two extra numbers are exactly the ones a derived type cannot recover later: an instance an artist placed can be re-hashed from its address, and a blade has no address — it exists between one cell entering range and leaving it. So they ride with it, and they are the fields of InstanceParameters a renderer copies straight across.

Fields and properties (3)

  • public FoliageInstance Instance

    Where it stands, which way it faces and how big it is.

  • public float Tint

    A per-blade variation the material maps how it likes, 0…1.

  • public float WindPhase

    A per-blade phase offset in radians, so a clump does not move as one object.

Methods (1)

  • public GrassBlade(FoliageInstance Instance, float Tint, float WindPhase)

    One blade of grass, as the scatter produces it.

Used by (6)

  • GrassDispatchTestsVixen.Rendering.Terrain.Tests
  • GrassInstanceRecordVixen.Rendering.Terrain
  • GrassRendererVixen.Rendering.Terrain
  • GrassScatterVixen.Foliage
  • GrassScatterTestsVixen.Foliage.Tests
  • TerrainSurfaceTestsVixen.Rendering.Terrain.Tests