- Home /
Shader and material for GPU instancing particles?
Hi,
I just updated Unity to 2018.1.6f1 to start using GPU instancing to handle a large number of projectiles. The GPU instancing itself is working fine and the performance increase was enormous so that's great but I've never used meshes for particles before and I'm a bit confused about how to get additively blended particles with GPU instancing.
I currently just have the 'Standard' shader on for the particle material as this is the only one I can see that has the checkbox for GPU instancing. If I'm not mistaken, the 'Particles/Standard Surface' shader should have checkbox but I don't see it and instead I just get https://gyazo.com/43512e317b0e0f9a1e83d1573f59ee82. Is there something wrong with my shader or my configuration? Should I just write a custom shader?
Anyway, hope this post doesn't sound too confused.
Answer by hector_gutierrezc_tvj32015 · Jun 28, 2018 at 01:56 PM
The normal shader for that is the particle additive, if you want to hold the colors, use an alpha blended. Usually on particles you dont want to use the standard
The normal 'Particles/Additive' shader doesn't have a checkbox to enable GPU instancing for me.
Particles/Standard Surface is the one to use. Particles/additive is legacy
Answer by richardkettlewell · Jul 04, 2018 at 08:50 PM
For particles, you are correct to use Particles/Standard Surface for a lit particle effect. For additive, which is unlit, use Particles/Standard Unlit. There are options for additive blending on that shader.
The instancing checkbox for particles is on the particle system, not the shader. It’s in the renderer module, and it’s enabled by default.
If you take a look at the stats panel in the Game View, you will see a lot of successful batching if gpu Mesh instancing is enabled.