diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-11-07 02:16:46 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-11-07 02:19:14 +0300 |
commit | 8af53dbeab8ad692c1a0b4d82b6ac955f0b94a45 (patch) | |
tree | 1f5de4fe996e5b378fe4906cf025d94d65b3a7d3 /source/blender/draw/intern/draw_manager_exec.c | |
parent | 4c8d88b48542e4e54c9ac143f82e085b6dddaff5 (diff) |
Workbench: Fix volumetric blending leading to corrupted render results
Use simpler premultiplied blending.
Diffstat (limited to 'source/blender/draw/intern/draw_manager_exec.c')
-rw-r--r-- | source/blender/draw/intern/draw_manager_exec.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/draw/intern/draw_manager_exec.c b/source/blender/draw/intern/draw_manager_exec.c index a5d0125c2a8..2d56c7e0cfe 100644 --- a/source/blender/draw/intern/draw_manager_exec.c +++ b/source/blender/draw/intern/draw_manager_exec.c @@ -224,7 +224,7 @@ void drw_state_set(DRWState state) int test; if (CHANGED_ANY_STORE_VAR( DRW_STATE_BLEND | DRW_STATE_BLEND_PREMUL | DRW_STATE_ADDITIVE | - DRW_STATE_MULTIPLY | DRW_STATE_TRANSMISSION | DRW_STATE_ADDITIVE_FULL | + DRW_STATE_MULTIPLY | DRW_STATE_ADDITIVE_FULL | DRW_STATE_BLEND_OIT, test)) { @@ -241,9 +241,6 @@ void drw_state_set(DRWState state) else if ((state & DRW_STATE_MULTIPLY) != 0) { glBlendFunc(GL_DST_COLOR, GL_ZERO); } - else if ((state & DRW_STATE_TRANSMISSION) != 0) { - glBlendFunc(GL_ONE, GL_SRC_ALPHA); - } else if ((state & DRW_STATE_BLEND_OIT) != 0) { glBlendFuncSeparate(GL_ONE, GL_ONE, /* RGB */ GL_ZERO, GL_ONE_MINUS_SRC_ALPHA); /* Alpha */ |