Archived

This topic is now archived and is closed to further replies.

flutey

what is glAlphaFunc ?

Recommended Posts

hi, in some code that makes blending i saw functions : glAlphaFunc(GL_GREATER,0.0) and glEnable(GL_ALPHA_TEST); can some one please explain to me what does those calls do? Flutey Shady El Mously Egyptian Game Programmer (there is no knowledge that is not power)

Share this post


Link to post
Share on other sites
The alpha test causes the alpha values of every pixel to be tested. If they past the test, they are drawn. Otherwise, they are not. The way they are tested is determined by glAlphaFunc. In the case of your example, only pixels with an alpha value greater than 0.0 will be drawn.

Technically, the alpha test and function have nothing to do with blending.

Share this post


Link to post
Share on other sites