Grass Demo - Instancing and Compute Buffers

Grass Demo (3.3 MB)

  • build 349+ only


An advanced terrain and grass rendering demo that uses compute buffers and instancing to render 200,000+ individual grass blades (6 triangles each). Various options are available to customise the grass rendering

There’s also a switch to enable depth camera masking for some silly reason

Possible extensions:

  • Grass painting tool
  • Chunked terrain
  • Level of detail (LOD)
  • GPU frustum culling
  • Fire simulation and particles
1 Like

This is very cool. Really shows the power of having access to the full GPU functionality in Codea 4.x. I can’t believe it runs at 120fps on an iPad Pro from 2018!

1 Like

A good example, with this sample project and the reaction diffusion example, one can quickly learn how to use Compute shader in Codea 4, you can put these two sample projects in the release as built-in sample projects for subsequent new releases