[Bf-blender-cvs] [97d9d62] master: Set clip alpha to small non-zero value

Campbell Barton noreply at git.blender.org
Tue Feb 9 02:07:38 CET 2016


Commit: 97d9d6224c5e3be3e3ddff012558ed9e03cf0e32
Author: Campbell Barton
Date:   Tue Feb 9 11:56:40 2016 +1100
Branches: master
https://developer.blender.org/rB97d9d6224c5e3be3e3ddff012558ed9e03cf0e32

Set clip alpha to small non-zero value

This amends 089d2a18 which was a known driver bug (T46962),
increasing the clipping to avoid precision issues.

===================================================================

M	source/blender/blenloader/intern/versioning_defaults.c

===================================================================

diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 894d599..ddfbf18 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -64,8 +64,10 @@ void BLO_update_defaults_userpref_blend(void)
 	/* default from T47064 */
 	U.audiorate = 48000;
 
-	/* for some reason U.glalphaclip was 1.8367099231598242e-40 */
-	U.glalphaclip = 0.0f;
+	/* Keep this a very small, non-zero number so zero-alpha doesn't mask out objects behind it.
+	 * but take care since some hardware has driver bugs here (T46962).
+	 * Further hardware workarounds should be made in gpu_extensions.c */
+	U.glalphaclip = (1.5f / 255);
 }
 
 /**




More information about the Bf-blender-cvs mailing list