How to ensure particles draw?

I’ve noticed on several projects (Unity 5) that when instantiating multiple of the same prefab with particles, the later instantiated particles fail to draw (render).

My instinct is that some sort of max particle cap is being hit, and stops drawing, but I’d be very surprised at this happening with a few trail renderers, smoke and sparks for two prefabs.

If I wait for the previous instantiated prefab particles to die, then instantiate the prefab again everything draws fine. But when a copy is instantiated before the previous particles clean up, the new particles do not render.

Is there a setting somewhere to ensure that particles always render?

I’ve discovered that the core issue lies within the additive particle shaders. There must be some sort of logic for culling particles that affects any renderers using particle additive materials.

The cause of this problem is that, by default, instantiating a prefab will use a shared material instance which for some reason will fail to render when multiple instances are on screen for certain shaders.

To fix this issue an instanced material must be used instead of a shared material. This can be accomplished by setting the material to itself or editing it.

// Force instancing of the material
Renderer renderer = GetComponent<Renderer>();
renderer.material = renderer.material