The CodeMasters blog entry http://blog.codemasters.com/grid/10/rendering-fields-of-grass-in-grid-autosport/ made me think again about my Grass rendering using a Geometry Shader. I had followed the suggestions from Outerra http://outerra.blogspot.co.uk/2012/05/procedural-grass-rendering.html to generate my grass but CodeMasters suggested combining this approach with simple billboards.
Instead of each geometry shader triangle strip representing a single blade of grass, why not just output a quad with a nicely detailed, colourful, texture. The textured quad might represent 5 or 10 blades of grass, rotated and scaled. This is a massive increase in grass density with better art, than the Outerra model.
With a bit of texture atlasing of various textures I could generate a very varied meadow with only some basic changes to my shader – and use less vertexes per location as well. Although the end result is clearly more “billboard” than “geometry” it still achieves a much higher density of foliage.
Here is the outcome with a four texture atlas
This is animated in the normal way using some perlin noise textures to generate movement. The density of the grass is overwhelming here – it looks like a forest. Changing the texture atlas to something more “grassy”;
Mmm. Thats nice.
Meadows underplating shadowed trees, distant ocean and mountains. 80 fps.