PDA

View Full Version : Additive Blending



phlake
10-04-2000, 08:51 AM
I'm trying to get an additive blending effect, and having some difficulty.

Consider two polygons, the first drawn textured and opaque. The second drawn in front of the first, with blending enabled. The effect i would like to achieve is similar to Photoshop's "screen" blending mode: the second polygon, where opaque, should brighten the first. The source and dest should be added.

Note that I'm using seperate geometry here; multi-texturing won't be satisfactory in this particular case.

phlake
10-04-2000, 09:28 AM
Nevermind.... =)

the answer is glBlendFunc (GL_SRC_ALPHA, GL_ONE);

use the alpha channel of the incoming fragment, but don't diminish the value of the currently stored pixel.