Advertisement

transparent TGAs

Started by December 11, 2004 11:29 PM
22 comments, last by clint8565 19 years, 11 months ago
THANK YOU ENIGMA!!!!! MAN I'm RETARDED
Enigma beat me to it. Just remember to disable the GL_BLEND when you are done with the blended square so that the rest won't be blended later. Also, I recommend you try a different method of drawing the transparent quads. You can enable the alpha test in OpenGL that automatically does the transperency and if you want to blend other things at the same time, you can enable and disable both blending and the alpha test. I think it is easier to do it that way as long as the quads are sprites like trees where it is either transparent or not. If it partly transparent, you have to use GL_BLEND, but for 0 or 1 as the alphas, invisible or fully visible pixels, the Alpha test is faster because OpenGL doesn't have to do blending calulations for that. Instead it just gives a true or false test per pixel.


Advertisement
Just a bit about PhotoShop. You get alpha from alpah chanel (not layer). Select chanels and then add another one. By default it will be named "Alpha 1". You can draw into it normaly like in any other chanel. Then just save as 32bit TGA/DDS/PNG and it works.
You should never let your fears become the boundaries of your dreams.
hey thanks kburkhart84 you fixed another issue I have with my lines and junk not showing up
Darkwing I was using the alpha channel all along and it was working fine, I just forgot GL_BLEND

This topic is closed to new replies.

Advertisement