forked from bartvdbraak/blender
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.
This commit is contained in:
parent
72ac596e19
commit
a9bb96e659
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user