-> Alpha Clip Tweak

Apparently on some cards/drivers setting alpha clip to 1.0 will make every 
pixel get clipped out regardless of its associated alpha value being 1.0. 
Added a fix for this.
This commit is contained in:
Geoffrey Bantle
2007-12-22 12:05:27 +00:00
parent 849b929c25
commit a000473d9d

View File

@@ -241,9 +241,13 @@ int set_tpage(MTFace *tface)
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
/* added after 2.45 to clip alpha */
glEnable ( GL_ALPHA_TEST );
glAlphaFunc ( GL_GREATER, U.glalphaclip );
/*if U.glalphaclip == 1.0, some cards go bonkers... turn off alpha test in this case*/
if(U.glalphaclip == 1.0) glDisable(GL_ALPHA_TEST);
else{
glEnable ( GL_ALPHA_TEST );
glAlphaFunc ( GL_GREATER, U.glalphaclip );
}
/* glBlendEquationEXT(GL_FUNC_ADD_EXT); */
}