From 51f0e36509f0626a1d97c99de1d0d98331b88f5b Mon Sep 17 00:00:00 2001 From: Allen Pestaluky Date: Tue, 23 May 2023 16:17:45 -0400 Subject: [PATCH] Fixed issues with blend modes in OpenGL 3 renderer Added uses_blend_alpha = true for ADD, SUBTRACT, and MULTIPLY blend modes to match the other renderers Fixes #76334 --- drivers/gles3/storage/material_storage.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp index c7b2a715bed..db74708214c 100644 --- a/drivers/gles3/storage/material_storage.cpp +++ b/drivers/gles3/storage/material_storage.cpp @@ -3452,6 +3452,10 @@ void SceneShaderData::set_code(const String &p_code) { blend_mode = BLEND_MODE_ALPHA_TO_COVERAGE; } + if (blend_mode == BLEND_MODE_ADD || blend_mode == BLEND_MODE_SUB || blend_mode == BLEND_MODE_MUL) { + uses_blend_alpha = true; // Force alpha used because of blend. + } + valid = true; }