View Full Version : Which BlendFunc(...) to use ?
09-29-2005, 04:59 AM
Please help me choose the proper blending function:
I have an RGB image with some BLACK spots...
How do I make those BLACK areas transparent ?
09-29-2005, 05:40 AM
If I were you, I would try to make your RGB image an RGBA image and set the alpha value whenever there's a black spot to zero (and to one otherwise).
Then I would:
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
...before I started putting the vertexes out.
09-29-2005, 12:26 PM
I'm using glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) ;
textures: I bind 24 and 8 bit bitmaps or make alpha from choosen color and create file that can be directly load to memory.
If you want I can send source or .exe of my binder - it's made in bc++b.
09-29-2005, 03:05 PM
To make the black spots transparent you'd have to use something like:
That will probably not look very satisfying though. The better way is to add an alpha channel because that gives you independent control of color and alpha, and then use the other suggestions already posted.
09-29-2005, 08:43 PM
Thanks a lot.
I'm getting Ok results with this:
// select the cactus texture
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
Image is basically a tree with BLACK background.
Sometimes, I can still see "black" dots here and there near the corners...( during rendering )
Whats the reason for that ?
Could someone tell me how to create an ALPHA map in photoshop ?
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.