Use GL_ALPHA_TEST when drawing alpha faces in the 3d view, as suggested by Eskil, some scenes are unusable without this.

at the moment it wont draw totally transperent pixels, this may need to be adjusted or made into a preference.
This commit is contained in:
Campbell Barton
2007-10-18 13:51:10 +00:00
parent 6576464b03
commit fde4edd1bd

View File

@@ -239,14 +239,22 @@ int set_tpage(MTFace *tface)
}
else if(alphamode==TF_ALPHA) {
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
/* added after 2.45 to clip alpha */
glEnable ( GL_ALPHA_TEST );
glAlphaFunc ( GL_GREATER, 0.001 );
/* glBlendEquationEXT(GL_FUNC_ADD_EXT); */
}
/* else { */
/* glBlendFunc(GL_ONE, GL_ONE); */
/* glBlendEquationEXT(GL_FUNC_REVERSE_SUBTRACT_EXT); */
/* } */
} else {
glDisable(GL_BLEND);
glDisable ( GL_ALPHA_TEST );
}
else glDisable(GL_BLEND);
}
ima= tface->tpage;