Joe Wheater
Posted on July 24, 2017 by wheatsbeats on Uncategorized

Unity GPU Instance Shader

On the weekend I spent some time with a friend looking into GPU instance shaders in Unity, specifically the DrawMeshInstancedIndirect function which allows you to pass it a Mesh to be generated on the GPU. This allowed us to generate an enormous amount (approximately 250,000) of cubes and animate the position using some curl noise. Combined with Unity’s Standard Surface shader we were able to have something looking very nice with directional light and reflection cube maps in no time. Finally we added the new Post-Processing stack that Unity has recently released and it looks amazing.

Leave a Reply