# Unity Additive particle effect blends with background

I created a fire particle effect with the Particles/Additive (Soft) shader in Unity 5.2.2, and it looks fine against a dark background, like the editor background:

However, when I move it in front of a lighter background, it looks like this:

I think the additive property is blending with the background, is there a workaround to make the effect look like how it looks on a dark background, without using a different shader?

I've looked at this question: How can I achieve a good fire effect with alpha blending and particles? but I'm not sure how I would execute that in Unity.

There are 2 hacks I can think of with which you can acheive this.

1. You can create an alpha-blended 'mask particle system' for every additive particle system you create. Render the mask particle system first and then on top of it, render the actual one. This way all the particles in the paricle system will be 'guarded' by the consistent underlying alpha blended particle from the variable backgorund.

If you use unity's built-in particle system to create particles then you'll have to make sure that there isn't much randomness in the particle. Otherwise the mask will not be much identical to the real one and will create some 'unguarded' areas.

If you are using your own particle system then for every particle in the system you'll have to create an identical particle in the 'mask-particle-system' which will follow the exact path of its corresponding real-particle. Then, render the mask-system and then the real one.

The mask-particle-system should preferably use the full-black version of the particle texture.

Fire particle

You'll have to adjust the sorting layer order of the particle objects. This can done attaching the following script to all the particle systems. Set the layerOrder of mask system as 1 and that of real one as 2.

  public int layerOrder;
void Start () {
ParticleSystem particleSys = GetComponent<ParticleSystem>();
Renderer renderer = particleSys.GetComponent<Renderer>();
renderer.sortingOrder = layerOrder;
}


This is what I acheived this way.