Vixen
02b45cc4
csharp
public struct GrassCellRecord

One cell the scatter dispatch covers, as GrassScatter.rvn packs it.

Read the guide page for this →

Remarks

⚠ Sixteen bytes, and the layout is the shader's declaration order. A field added carelessly here does not fail — it reads cell one out of the middle of cell zero, which draws as a field of grass in the wrong place that moves when anything else changes.

Fields and properties (5)

  • public int CellX

    The cell's X coordinate. Signed: a world has no origin corner.

  • public int CellZ

    And its Z.

  • public uint First

    Where this cell's blades begin in the instance buffer.

  • public uint Capacity

    How many it may write before it must stop.

  • public static int SizeInBytes

    How many bytes one of these is.

Used by (2)

  • GrassDispatchVixen.Rendering.Terrain
  • GrassDispatchTestsVixen.Rendering.Terrain.Tests