GPU Grass Renderer WIP

GPU Grass Renderer – Real-Time 3D Grass Rendering WIP

The GPU Grass Renderer is a real-time vegetation rendering system that generates, animates, and renders thousands of 3D grass meshes directly on the GPU. Unlike traditional billboard approaches, this version uses real geometry for each grass clump, allowing close-up detail and realistic interaction with lighting.

The renderer divides the terrain into GPU-driven chunks, each processed independently by compute shaders. These shaders sample height and splat maps to place instances procedurally across the surface. Each grass mesh is then drawn using indirect instancing, ensuring minimal CPU overhead even with millions of blades rendered simultaneously.

Key Technical Features:

  • Procedural grass placement via GPU compute shaders.
  • 3D grass meshes rendered using DrawMeshInstancedIndirect.
  • Chunk-based generation and GPU bounds for efficient culling.
  • Sampling from terrain heightmaps and splatmaps for accurate placement.
  • Procedural wind animation and per-instance randomization in the vertex shader. TODO
  • Full GPU pipeline: no CPU-driven instancing or per-frame mesh updates.

Technical Showcase

What I Learned:

  • Integration of compute shaders with Unity’s graphics pipeline.
  • Efficient indirect instancing and draw call batching.
  • Handling terrain-based data entirely on GPU memory.
  • Balancing realism and performance for large-scale procedural rendering.

References & Credits