diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-06-27 13:33:57 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-06-27 13:33:57 +0400 |
commit | a9bb96e6593123f92ebf37bdbbd2b55b27afd81f (patch) | |
tree | 4112c7af529e6a2f4a2b615a0ecf86d83f179dfe /source | |
parent | 72ac596e19ddb37636e107635b52ee78888460e7 (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_view3d/drawmesh.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index de4011c9349..bf0b7850839 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)); |