Vixen
dd8b0a81

Rendering · guide

Drawing foliage

Cells culled as objects, instances culled within them, LOD decided per instance, and one indirect command per level.

Edit this page on GitHub

Documents

Next

  • Foliage instances — Trees and rocks stored in a cell grid, the six rules that refuse a placement, and the activation radius that decides which of them are worth a physics body.
  • Grass — A field scattered from a rule and never saved — the density curve, the hash both halves share, and the ring of buffers that makes it cost a fixed amount of memory.
  • Culling and streaming instances — Per-instance culling and LOD binning inside a batch, per-instance parameters beside the transforms, and a grid that keeps pages resident around whoever is moving.
  • Drawing grass — Cells scattered as they come into range and blades culled every frame — the CPU reference of a compute pass, and the seam test that holds the two together.
  • Impostors — A tree photographed from a hemi-octahedral grid of directions once, offline, and drawn as two triangles for ever after.
  • Drawing a terrain — A quadtree with a vertex morph, one instanced grid patch, no vertex buffer, and one draw call however many patches it takes.
  • Foliage mode — The mode that requires nothing — six tools, a palette, surface filters, and instance selection through the transform gizmo.