Skip to content

Commit

Permalink
Fixed issues with blend modes in OpenGL 3 renderer
Browse files Browse the repository at this point in the history
Added uses_blend_alpha = true for ADD, SUBTRACT, and MULTIPLY blend modes to match the other renderers

Fixes #76334
  • Loading branch information
allenwp committed May 24, 2023
1 parent f581f21 commit 51f0e36
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gles3/storage/material_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 51f0e36

Please sign in to comment.