Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-08-30 13:40:27 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-30 14:11:03 +0300
commitad5d5d3f3bb2765a97cfc07202d00d8112701fea (patch)
treecec8de78fbda74d5fb2e07c577e6de7f794666f5
parentd98c722a5a863d2a5caded350c57fc8322c5548e (diff)
EEVEE: Fix broken rendering caused by SSR + Alpha blended material
This was affecting Mesa drivers as well as AMD pro driver. But it might have been noticeable on other config too. This was introduced by rBa9f2ebb21508.
-rw-r--r--source/blender/gpu/opengl/gl_state.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/gpu/opengl/gl_state.cc b/source/blender/gpu/opengl/gl_state.cc
index 84824191a12..8f01ff13486 100644
--- a/source/blender/gpu/opengl/gl_state.cc
+++ b/source/blender/gpu/opengl/gl_state.cc
@@ -407,8 +407,10 @@ void GLStateManager::set_blend(const eGPUBlend value)
}
}
+ /* Always set the blend function. This avoid a rendering error when blending is disabled but
+ * GPU_BLEND_CUSTOM was used just before and the framebuffer is using more than 1 color targe */
+ glBlendFuncSeparate(src_rgb, dst_rgb, src_alpha, dst_alpha);
if (value != GPU_BLEND_NONE) {
- glBlendFuncSeparate(src_rgb, dst_rgb, src_alpha, dst_alpha);
glEnable(GL_BLEND);
}
else {