From ab4e79cd03df9e07690fe403c5cfaf83f6c7b0e0 Mon Sep 17 00:00:00 2001 From: clayjohn Date: Mon, 13 Feb 2023 14:46:26 -0800 Subject: Store blend mode between CanvasItems to preserve batching --- drivers/gles3/rasterizer_canvas_gles3.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp index 3c5441f3c4..2a524e8c3a 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_gles3.cpp @@ -566,6 +566,7 @@ void RasterizerCanvasGLES3::_render_items(RID p_to_render_target, int p_item_cou uint32_t index = 0; Item *current_clip = nullptr; + GLES3::CanvasShaderData *shader_data_cache = nullptr; // Record Batches. // First item always forms its own batch. @@ -602,7 +603,6 @@ void RasterizerCanvasGLES3::_render_items(RID p_to_render_target, int p_item_cou } } - GLES3::CanvasShaderData *shader_data_cache = nullptr; if (material != state.canvas_instance_batches[state.current_batch_index].material) { _new_batch(batch_broken); -- cgit v1.2.3