summaryrefslogtreecommitdiff
path: root/drivers/gles3
diff options
context:
space:
mode:
authorYuri Sizov <11782833+YuriSizov@users.noreply.github.com>2023-02-04 21:38:25 +0300
committerGitHub <noreply@github.com>2023-02-04 21:38:25 +0300
commit2bd530270414ae19bcad358741ca9c253d5e5125 (patch)
tree47be98c19665c3971dffd31d3035156aedcdc7ab /drivers/gles3
parent373295fa1580d732ad3be427b77d0fa74dce37a1 (diff)
parentdfbf4390816bee93b373549afc125969d9f13d17 (diff)
Merge pull request #72695 from clayjohn/CanvasGroup-shading
Avoid shading CanvasGroup nodes twice
Diffstat (limited to 'drivers/gles3')
-rw-r--r--drivers/gles3/rasterizer_canvas_gles3.cpp2
-rw-r--r--drivers/gles3/shaders/canvas.glsl2
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp
index eb1b2f84b4..7f67651e62 100644
--- a/drivers/gles3/rasterizer_canvas_gles3.cpp
+++ b/drivers/gles3/rasterizer_canvas_gles3.cpp
@@ -2690,6 +2690,7 @@ RasterizerCanvasGLES3::RasterizerCanvasGLES3() {
// Default CanvasGroup shader.
shader_type canvas_item;
+render_mode unshaded;
uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest;
@@ -2717,6 +2718,7 @@ void fragment() {
// Default clip children shader.
shader_type canvas_item;
+render_mode unshaded;
uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest;
diff --git a/drivers/gles3/shaders/canvas.glsl b/drivers/gles3/shaders/canvas.glsl
index 8c7b52f379..ea0a0b660d 100644
--- a/drivers/gles3/shaders/canvas.glsl
+++ b/drivers/gles3/shaders/canvas.glsl
@@ -649,7 +649,7 @@ void main() {
#ifdef MODE_LIGHT_ONLY
color = vec4(0.0);
-#else
+#elif !defined(MODE_UNSHADED)
color *= canvas_modulation;
#endif