I would like to add some sparkly particle effects to my High Score table, but I seem to have run into a problem.
Below you see the particle system in question, it’s from the standard assets, and has the additive particle shader applied.
[27414-shader+troubles.png|27414]
The issue is that when I have the particles render over the top of my background sprite, it adds the sprite as well, which causes the sparkles to appear white.
[27415-shader+troubles2.png|27415]
Is there a way that I can get those particles to only add to each other and ignore the sprite when they render?
I get the problem you are having, but, unfortunately, the solution you are proposing doesn’t really make sense. When additively blending a pixel, one needs to have a source colour to add to, that colour is, of course, whatever colour the pixel already is. I guess if the particles were rendered to a separate render texture, and that texture had an alpha channel, then perhaps it could be alpha blended onto the scene. But, even then it would be very difficult to get the right fill colour for that render texture to avoid a halo effect around the translucent parts of your effect.
The simple fact is, additive blending can look really cool, but it’s always pretty tricky. If you know the exact situations in which the effect will be used, and have a pretty good idea which colours the effect will blend over (Say, the blue of your sprite, above) then you can colour your particles accordingly to compensate by darkening them a lot so they don’t blow out over the background. And, of course, additive blending over light colours will always blow out as there’s no head room to blend any lighter.
Ancient thread but I still stumbled across it easily with a quick google. The best way I found to do this is with multiple cameras.
So you render your particles on a layer/camera where only they render and then you render that camera over the first and then you get consistent results regardless of background.
In my case I already had multiple cameras setup so this had no performance cost for me but worth being aware this of course requires an extra rendering pass for the second camera.