Making a custom shader use GPU Instancing?
So, I'm trying to get grass waving, and found this: https://assetstore.unity.com/packages/vfx/shaders/waving-interactive-grass-150003 Which is actually just a more fine-tuned version of this: https://lindenreid.wordpress.com/2018/01/07/waving-grass-shader-in-unity/ It works great, except there's no option to turn on GPU Instancing. I'm going to need a lot of grass. I see in the comments for that tutorial something about using the UV's U component to make the meshes batch or something? I have no idea. Here's the comment: https://lindenreid.wordpress.com/2018/01/07/waving-grass-shader-in-unity/#comment-477 I guess I'm asking if anyone knows what that person is talking about, and how to do it.
Answer by DrDust265 · Oct 16, 2019 at 07:49 PM
Eventually discovered that all I needed to do was add one line of code: #pragma multi_compile_instancing Well... that took a long time to find...