   alpha blending particles
  I wrote a ParticleSystem class that can be extended to make pretty much any particle effect easily.  Ive been having a lot of problems with alpha blending tho.  Ive made 3 effects with it so far: fire, smoketrail and a fireball.  Ive been using a black background and each effect has been pretty much isolated.  For the fire and fireball I use (destcolor * 1 + srccolor * invdestcolor) to get a nice additive effect (the center of the fire is brighter because more particles are stacked on top of each other and single particles are very hard to see).  The problem tho is that if I use a white background, or put anything behind either of these effects they stop working (cause white*1 + anything = white).  Since my smoketrail effect works great on any background using (destcolor * invsrcalpha + srccolor * srcalpha) I tried switching my fire effects to this.  The problem is that they totally lose the additive effect I was using before.  Does anyone know a good way to get around this problem?  I want the fire particles to add to each other but not to the background.   
  This may or may not work. I have never done this, but this is what I am thinking of offhand.1) Render your whole scene as normal except for the particles with ztesting and zwriting on.2) Create an offscreen texture with the same dimensions as the color buffer3) Clear the texture to black and render your particles testing against the depth buffer from before to the texture.4) Now you have your particles blended independent of the scene background and you can blend the texture onto your color buffer such that each nonblack pixel in the texture overwrites the corresponding pixel in the color buffer.You lose particle-scene transparency with this, but it seems like it might avoid the problem you are talking about.Edit: On second thought, you may be able to keep particle-scene transparency  if you use some sort of interpolative blending between the final rendered texture and the color buffer so that the final color value at each pixel falls in between the colors of the color buffer and the corresponding texture.   ;  yea Im thinking about adding something like that.  Theres got to be some way to make particle effects look the same under different backgrounds with alpha blending tho right??  I mean these marketed particle engines manage to pull it off right?  I tried making a particle that had alpha values equal to the color (in greyscale).  It worked fine for smoke (but smoke is incredibly easy) but fire just looks stupid no matter how I do it.  Using INVSRCALHPA and SRCALPHA creates an averaging effect so that if the background whites, groups of particles appear brighter but on a black background they appear darker.  How is it possible to get right?   