diff --git a/drivers/gles2/rasterizer_canvas_base_gles2.cpp b/drivers/gles2/rasterizer_canvas_base_gles2.cpp index 5032ea9019e..7d930b54118 100644 --- a/drivers/gles2/rasterizer_canvas_base_gles2.cpp +++ b/drivers/gles2/rasterizer_canvas_base_gles2.cpp @@ -1063,6 +1063,10 @@ void RasterizerCanvasBaseGLES2::initialize() { state.canvas_shader.init(); + state.using_light_angle = false; + state.using_large_vertex = false; + state.using_modulate = false; + _set_texture_rect_mode(true); state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_RGBA_SHADOWS, storage->config.use_rgba_2d_shadows); diff --git a/drivers/gles_common/rasterizer_canvas_batcher.h b/drivers/gles_common/rasterizer_canvas_batcher.h index 1b51c9daf26..545033aac05 100644 --- a/drivers/gles_common/rasterizer_canvas_batcher.h +++ b/drivers/gles_common/rasterizer_canvas_batcher.h @@ -1900,7 +1900,7 @@ bool C_PREAMBLE::_prefill_rect(RasterizerCanvas::Item::CommandRect *rect, FillSt // we need to treat color change separately because we need to count these // to decide whether to switch on the fly to colored vertices. - if (!r_fill_state.curr_batch->color.equals(col)) { + if (!change_batch && !r_fill_state.curr_batch->color.equals(col)) { change_batch = true; bdata.total_color_changes++; }