dcd
08-13-2002, 02:48 PM
I have two bitmaps that I edited in Photoshop. One is an image of clouds with a blue background and white clouds. The other is an image of a white sun with a black background. I created alpha channels for each bitmap. The bitmap of the clouds has the alpha for the blue background as 0 and the clouds as 1. The bitmap of the sun has the black background as 0 and the sun as 1.
I get the desired effect of the clouds obscuring the sun when they go over the sun and the sun being more visible when the clouds are not over the sun. However the clouds show up with a black background instead of the blue background. (ie. they appear to just have alpha color and not rgb color)
I am using glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) to do the blending. How can I do this while still retaining the blue background of the clouds?
I get the desired effect of the clouds obscuring the sun when they go over the sun and the sun being more visible when the clouds are not over the sun. However the clouds show up with a black background instead of the blue background. (ie. they appear to just have alpha color and not rgb color)
I am using glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) to do the blending. How can I do this while still retaining the blue background of the clouds?