From dfbf4390816bee93b373549afc125969d9f13d17 Mon Sep 17 00:00:00 2001 From: clayjohn Date: Fri, 3 Feb 2023 15:40:19 -0800 Subject: Avoid shading CanvasGroup nodes twice --- drivers/gles3/rasterizer_canvas_gles3.cpp | 2 ++ drivers/gles3/shaders/canvas.glsl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/gles3') diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp index d08f7ba7b6..05d7ac4719 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_gles3.cpp @@ -2684,6 +2684,7 @@ RasterizerCanvasGLES3::RasterizerCanvasGLES3() { // Default CanvasGroup shader. shader_type canvas_item; +render_mode unshaded; uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest; @@ -2711,6 +2712,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 1631c65385..12a8302231 100644 --- a/drivers/gles3/shaders/canvas.glsl +++ b/drivers/gles3/shaders/canvas.glsl @@ -645,7 +645,7 @@ void main() { #ifdef MODE_LIGHT_ONLY color = vec4(0.0); -#else +#elif !defined(MODE_UNSHADED) color *= canvas_modulation; #endif -- cgit v1.2.3