Vixen
c7401864
csharp
public readonly record struct FoliageMesh

The device geometry one foliage type's instances are drawn from.

Read the guide page for this →

Remarks

⚠ One mesh for every instance of the type, which is what makes a forest a few draws. A tree differs from its neighbour by its thirty-two-byte cull record and by nothing in its geometry — GrassBladeMesh's argument, one order of magnitude up. The LOD levels are index ranges into this one buffer, carried by Levels' first-index and index-count fields, so a level switch is a different indirect command rather than a different binding.

Fields and properties (4)

  • public BufferHandle Vertices

    Its vertex buffer: position, normal, texcoord — 32 bytes a vertex.

  • public BufferHandle Indices

    Its index buffer, 32-bit.

  • public int IndexCount

    How many indices the whole buffer holds.

  • public bool IsValid

    Whether there is anything here to draw.

Methods (1)

  • public FoliageMesh(BufferHandle Vertices, BufferHandle Indices, int IndexCount)

    The device geometry one foliage type's instances are drawn from.

Used by (5)

  • FoliageDrawPassVixen.Rendering.Terrain
  • FoliageDrawPassTestsVixen.Rendering.Terrain.Tests
  • FoliageStandVixen.Rendering.Terrain
  • FoliageVelocityPassVixen.Rendering.Terrain
  • TerrainSceneRendererVixen.Rendering.Terrain