View Full Version : how to show a bitmap texture without the black background?
Hi there. I have the following problem: How does one get a bitmap onto the screen without the black background of the image being shown? I've tried alpha-blending and it works for the black parts but also the rest of the image now looks transparent. What's going wrong with it?
05-31-2001, 11:39 PM
Try enabling alpha testing instead of blending.
06-01-2001, 07:43 AM
There's nothing wrong with your alpha-blending. Your problem is, each pixel of your texture has the same alpha value. You need to put alpha value=0 to each black pixel in your texture and alpha value=1 for the rest of them. After that, you can enable the alpha-blending.
The easy way to do that is to find any software that can convert 24-bit BMP to 32-bit BMP and set alpha value=0 to black area of your texture. Or go to NeHe site and see tutorial on masking.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.