PDA

View Full Version : Transparency with a non-alpha texture?



wyrd
06-17-2004, 04:27 PM
How would I go about making a specific color in a texture transparent? I'm using bitmap files (which do not contain an alpha channel) for the textures if that helps.

ce110ut
06-17-2004, 07:01 PM
what I have done in the past was extending the bitmap in memory, be it in RGB, index or any non-alpha mode, into RGBA format.

...I don't know if that's the answer you were looking for...

:regards:

wyrd
06-17-2004, 11:14 PM
I just went ahead and used another file format that allowed alpha channels. :) Thanks for the suggestion though.

nexusone
06-18-2004, 04:43 PM
If you have to use BMP files you can create two versions of the BMP file.

One is the image and the other is the transparentcy mask.

You load the first image as a RGB and the second as the Apha channel image.
Then combine them in memory then load as a RGBA texture.


Originally posted by wyrd:
How would I go about making a specific color in a texture transparent? I'm using bitmap files (which do not contain an alpha channel) for the textures if that helps.