PDA

View Full Version : Blending Problem



appleGuy
09-11-2007, 10:46 AM
Hi,

Ok ive got a new problem. It seems that one side is the correct blending and the other side of the polygon is far too transparent.

my blending code is:

glDisable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR);A picture with good blending:
http://img.photobucket.com/albums/v315/blade99261/BlendGood.jpg

A picture with bad blending:
http://img.photobucket.com/albums/v315/blade99261/blendBad.jpg

Ignore the tears in the images, it was because of the refresh during screen shotting.

Im using the RGB values from images to determine the transparency and not an Alpha, this is because the images are gray scale anyway

Thanks For Any Help

Cheers,
-Alex

ZbuffeR
09-11-2007, 11:30 AM
Very few blending modes are order-independant.
GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR is not, do the math.
So try reversing polygon drawing order when the models turns to the other side.

appleGuy
09-11-2007, 03:45 PM
yes, your right.

Thanks For The Help

Cheers,
Alex