summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Hickling <ben.hickling@aria-networks.com>2018-03-26 14:12:23 +0100
committerBen Hickling <ben.hickling@aria-networks.com>2018-03-26 14:23:43 +0100
commit314a41951105bc6c37c570e5a9664d28a40ce985 (patch)
tree7d935468b4dbb60174708c45db6d8bbd18d064cb
parent928cdb4f8a72c2de5751cddd3205c2a3c09e6f6d (diff)
multiply blend mode fix for spatial materials
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index 02d851288a..5b6b3d44f2 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -2085,9 +2085,9 @@ void RasterizerSceneGLES3::_render_list(RenderList::Element **p_elements, int p_
case RasterizerStorageGLES3::Shader::Spatial::BLEND_MODE_MUL: {
glBlendEquation(GL_FUNC_ADD);
if (storage->frame.current_rt && storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT]) {
- glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+ glBlendFuncSeparate(GL_DST_COLOR, GL_ZERO, GL_DST_ALPHA, GL_ZERO);
} else {
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glBlendFuncSeparate(GL_DST_COLOR, GL_ZERO, GL_ZERO, GL_ONE);
}
} break;