Compute Shader is a great tool for manipulating the force of GPU to do useful things. Upon I learned the basics of writing shaders, I decided to take a further step to study how to write compute shaders. Here are some of my results.
Geometry Modification
Geometry Shaders are sometimes expensive and not well supported on some platforms. However, compute shaders could substitute geometry shaders to do all kinds of geometry modification tasks. In this demo, I modified a sphere by adding more vertices and animating them.
Flocking Simulation
Running parallel tasks on GPU is more efficient than on CPU. In this demo, I tried to implement Craig Reynolds' boid algorithm by writing compute shader. This demo works at 60FPS on my Macbook pro with Radeon Pro 560X Graphics card.
Procedural Grass Tool
Making grass for a game with a big map is a tiring and repeating job. In this demo, I tried to use computer shaders to generate grass blades and tweak them by parameters. I also added LODs to make the grass have a smaller performance overhead.