From 98e9578d66f4401727910d960a0f31abca889716 Mon Sep 17 00:00:00 2001 From: Stuart Carnie Date: Thu, 20 Jun 2024 11:52:34 +1000 Subject: [PATCH] Remove unused flag and code Related #48894 --- drivers/gles3/rasterizer_canvas_gles3.h | 1 - drivers/gles3/shaders/canvas.glsl | 7 ------- drivers/gles3/shaders/canvas_uniforms_inc.glsl | 1 - servers/rendering/renderer_rd/renderer_canvas_render_rd.h | 1 - servers/rendering/renderer_rd/shaders/canvas.glsl | 7 ------- .../rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl | 1 - 6 files changed, 18 deletions(-) diff --git a/drivers/gles3/rasterizer_canvas_gles3.h b/drivers/gles3/rasterizer_canvas_gles3.h index 7fc9992c3d9..46ed479a3d6 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.h +++ b/drivers/gles3/rasterizer_canvas_gles3.h @@ -63,7 +63,6 @@ class RasterizerCanvasGLES3 : public RendererCanvasRender { FLAGS_TRANSPOSE_RECT = (1 << 10), FLAGS_NINEPACH_DRAW_CENTER = (1 << 12), - FLAGS_USING_PARTICLES = (1 << 13), FLAGS_USE_SKELETON = (1 << 15), FLAGS_NINEPATCH_H_MODE_SHIFT = 16, diff --git a/drivers/gles3/shaders/canvas.glsl b/drivers/gles3/shaders/canvas.glsl index 4eb6f62482d..e3582307473 100644 --- a/drivers/gles3/shaders/canvas.glsl +++ b/drivers/gles3/shaders/canvas.glsl @@ -239,13 +239,6 @@ void main() { model_matrix = model_matrix * transpose(mat4(instance_xform0, instance_xform1, vec4(0.0, 0.0, 1.0, 0.0), vec4(0.0, 0.0, 0.0, 1.0))); #endif // USE_INSTANCING -#if !defined(USE_ATTRIBUTES) && !defined(USE_PRIMITIVE) - if (bool(read_draw_data_flags & FLAGS_USING_PARTICLES)) { - //scale by texture size - vertex /= read_draw_data_color_texture_pixel_size; - } -#endif - vec2 color_texture_pixel_size = read_draw_data_color_texture_pixel_size; #ifdef USE_POINT_SIZE diff --git a/drivers/gles3/shaders/canvas_uniforms_inc.glsl b/drivers/gles3/shaders/canvas_uniforms_inc.glsl index 21fd4d3d9dd..f6ad2b730ab 100644 --- a/drivers/gles3/shaders/canvas_uniforms_inc.glsl +++ b/drivers/gles3/shaders/canvas_uniforms_inc.glsl @@ -14,7 +14,6 @@ #define FLAGS_TRANSPOSE_RECT uint(1 << 10) // (1 << 11) is for FLAGS_CONVERT_ATTRIBUTES_TO_LINEAR in RD backends, unused here. #define FLAGS_NINEPACH_DRAW_CENTER uint(1 << 12) -#define FLAGS_USING_PARTICLES uint(1 << 13) #define FLAGS_NINEPATCH_H_MODE_SHIFT 16 #define FLAGS_NINEPATCH_V_MODE_SHIFT 18 diff --git a/servers/rendering/renderer_rd/renderer_canvas_render_rd.h b/servers/rendering/renderer_rd/renderer_canvas_render_rd.h index c7c5d343141..a78ced271a0 100644 --- a/servers/rendering/renderer_rd/renderer_canvas_render_rd.h +++ b/servers/rendering/renderer_rd/renderer_canvas_render_rd.h @@ -78,7 +78,6 @@ class RendererCanvasRenderRD : public RendererCanvasRender { FLAGS_CONVERT_ATTRIBUTES_TO_LINEAR = (1 << 11), FLAGS_NINEPACH_DRAW_CENTER = (1 << 12), - FLAGS_USING_PARTICLES = (1 << 13), FLAGS_USE_SKELETON = (1 << 15), FLAGS_NINEPATCH_H_MODE_SHIFT = 16, diff --git a/servers/rendering/renderer_rd/shaders/canvas.glsl b/servers/rendering/renderer_rd/shaders/canvas.glsl index dbff09c301c..4426d9eb662 100644 --- a/servers/rendering/renderer_rd/shaders/canvas.glsl +++ b/servers/rendering/renderer_rd/shaders/canvas.glsl @@ -193,13 +193,6 @@ void main() { } } -#if !defined(USE_ATTRIBUTES) && !defined(USE_PRIMITIVE) - if (bool(draw_data.flags & FLAGS_USING_PARTICLES)) { - //scale by texture size - vertex /= draw_data.color_texture_pixel_size; - } -#endif - #ifdef USE_POINT_SIZE float point_size = 1.0; #endif diff --git a/servers/rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl b/servers/rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl index 7ac7cf9c07f..8649f4710bf 100644 --- a/servers/rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl +++ b/servers/rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl @@ -14,7 +14,6 @@ #define FLAGS_TRANSPOSE_RECT (1 << 10) #define FLAGS_CONVERT_ATTRIBUTES_TO_LINEAR (1 << 11) #define FLAGS_NINEPACH_DRAW_CENTER (1 << 12) -#define FLAGS_USING_PARTICLES (1 << 13) #define FLAGS_NINEPATCH_H_MODE_SHIFT 16 #define FLAGS_NINEPATCH_V_MODE_SHIFT 18