diff options
author | Geoffrey Bantle <hairbat@yahoo.com> | 2007-12-22 15:05:27 +0300 |
---|---|---|
committer | Geoffrey Bantle <hairbat@yahoo.com> | 2007-12-22 15:05:27 +0300 |
commit | a000473d9d9c406b69caa55acb9e8394e5b2fcc5 (patch) | |
tree | 5faefba9a897c2daeff2ea7f7b1502cd70609028 /source/blender/src/drawmesh.c | |
parent | 849b929c25073326a07b2f8e9d7d1375f27b5357 (diff) |
-> 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.
Diffstat (limited to 'source/blender/src/drawmesh.c')
-rw-r--r-- | source/blender/src/drawmesh.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/src/drawmesh.c b/source/blender/src/drawmesh.c index 3c98888ead9..df5334dd27d 100644 --- a/source/blender/src/drawmesh.c +++ b/source/blender/src/drawmesh.c @@ -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); */ } |