summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-09-07 13:54:10 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-09-07 13:54:10 +0200
commit8f3042ed46443221ebf89291c990c41f83a5da01 (patch)
treecca2866f50be03666069ce7fa2510980c9769366 /drivers
parent7663c6992235f25af90df9fd57f76ac1d12d3869 (diff)
parente21a485dbc3d0540652c4527b30d059e7924eccd (diff)
downloadredot-engine-8f3042ed46443221ebf89291c990c41f83a5da01.tar.gz
Merge pull request #81395 from jsjtxietian/fix-clear-color-alpha-value-affect-2d-editor-in-compatibility
Fix clear color's alpha value will affects 2D editor in Compatibility mode
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/rasterizer_canvas_gles3.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp
index 0156876368..9818674de6 100644
--- a/drivers/gles3/rasterizer_canvas_gles3.cpp
+++ b/drivers/gles3/rasterizer_canvas_gles3.cpp
@@ -2115,7 +2115,7 @@ void RasterizerCanvasGLES3::canvas_begin(RID p_to_render_target, bool p_to_backb
if (render_target && render_target->clear_requested) {
const Color &col = render_target->clear_color;
- glClearColor(col.r, col.g, col.b, col.a);
+ glClearColor(col.r, col.g, col.b, render_target->is_transparent ? col.a : 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
render_target->clear_requested = false;