glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
This will do:
Source Colour (of the particle ) * Alpha of the particle +
Colour of destination (ie whats already there, your sky ) * ( 1 - alpha of the particle ).
This is the way to get it looking right against the sky, but you may need to change your colour and alpha values of the particles, as they seem to be set up nicely for being rendered additively against a black background.
In theory you should also do a depth sort and render the furthest transparent particles first before the ones in front.
quote:
I tried the GL_ONE , GL_ONE_MINUS_SRC_ALPHA, but that didnt work, the particles weren't transparent anymore for some reason.
Yep, that's right...that blend function does: source colour + destination colour * ( 1 - source alpha ).
so it would be a weirdy additive effect ie particle colour plus a bit from the background.
Game production:
Good, quick, cheap: Choose two.
Edited by - Danack on January 31, 2001 2:20:47 PM