Skip to main content
gamedev.net
🔒 Locked

AlphaTest

Started by Maxwan 0 replies 400+ views
Original Post
Maxwan
Maxwan
I really need help, since msdn dosent say enought to help me! The problem is that I don''t understand the alpha-testing. Is it possible to use alpha-testing with two textures or is alpha-testing only for 32bits with a alpha channal? Ehh sorry for beeing stupid. I have this two pics below, and I would like them use make the colored pic transparant using the black-white picture. I know it''s possible to do with blending, but since blending is slower and don´t work with fog I would like to use alphatesting. If someone can write me a piece of code, it would say me hours of time!
Ingenu
Ingenu
Alpha testing is selecting or rejecting an incoming fragment color based on the alpha channel value.

So you need embbed alpha.

You can do texture compositing yourself (adding the Alpha to the RGB) but your artists can probably as easily integrate the Alpha to the existing picture.

OpenGL:
glAlphaFunc( comparison, referenceValue );


-* So many things to do, so little time to spend. *-
-* So many things to do, so little time to spend. *-

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.