Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorGeoffrey Bantle <hairbat@yahoo.com>2007-12-22 15:05:27 +0300
committerGeoffrey Bantle <hairbat@yahoo.com>2007-12-22 15:05:27 +0300
commita000473d9d9c406b69caa55acb9e8394e5b2fcc5 (patch)
tree5faefba9a897c2daeff2ea7f7b1502cd70609028 /source
parent849b929c25073326a07b2f8e9d7d1375f27b5357 (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')
-rw-r--r--source/blender/src/drawmesh.c8
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); */
}