Grass in Geometry/Compute Shader

So right now I’m building my own grass system. I have a custom shader that does wind animation and responds to the player. I am instantiating the grass at runtime, and using 2 levels of scripts to turn renderers and grass game objects on and off. Basically there is a parent ‘area’ object that turns all the grass in it off if the player is too far away. If its on, all the grass objects are enabled and each determines if it should be rendered based on its own distance to the player. This keeps my Update calls from soaking up all the cpu time.

But I’ve seen examples of people doing this all on the gpu, and they all reference geometry shaders. I’ve been looking around and can find no documentation of these geometry shaders anywhere. I have found some things on compute shaders which seem to be different but I could be wrong.

I’m looking for places I can go read about geometry shaders with the intention of creating a terrain grass shader for my game. Any links are much appreciated.

Thanks!

This seems like a reasonable introduction: DirectX10 Tutorial 9: The Geometry Shader | Taking Initiative

And an example shader that uses it: http://forum.unity3d.com/attachments/gs-billboard-shader.40064/

Hi, i made a grass shader with lots of features like player interaction or placing the grass only on a certain height. If you are interested you can download it here: Best free Unity Grass Shader you will find! - YouTube