[Bf-blender-cvs] [a9bb96e] master: Fix transparency issues in 3d viewport
Sergey Sharybin
noreply at git.blender.org
Fri Jun 27 11:35:50 CEST 2014
Commit: a9bb96e6593123f92ebf37bdbbd2b55b27afd81f
Author: Sergey Sharybin
Date: Fri Jun 27 15:33:57 2014 +0600
https://developer.blender.org/rBa9bb96e6593123f92ebf37bdbbd2b55b27afd81f
Fix transparency issues in 3d viewport
The issue was introduced by 0f95149 and it only worked before
because default game material alpha blending was set to alpha.
Now it'll check whether material has transparency enabled and
will use alpha blending by default in this case.
===================================================================
M source/blender/editors/space_view3d/drawmesh.c
===================================================================
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index de4011c..bf0b785 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -237,6 +237,12 @@ static bool set_draw_settings_cached(int clearcache, MTFace *texface, Material *
int has_texface = texface != NULL;
bool need_set_tpage = false;
+ if (ma != NULL) {
+ if (ma->mode & MA_TRANSP) {
+ alphablend = GPU_BLEND_ALPHA;
+ }
+ }
+
if (clearcache) {
c_textured = c_lit = c_backculled = -1;
memset(&c_texface, 0, sizeof(MTFace));
More information about the Bf-blender-cvs
mailing list