@@ -2479,6 +2479,7 @@ void RendererCanvasRenderRD::_record_item_commands(const Item *p_item, RenderTar
24792479 r_current_batch = _new_batch (r_batch_broken);
24802480 r_current_batch->command_type = Item::Command::TYPE_NINEPATCH;
24812481 r_current_batch->command = c;
2482+ r_current_batch->has_blend = false ;
24822483 r_current_batch->pipeline_variant = PipelineVariant::PIPELINE_VARIANT_NINEPATCH;
24832484 }
24842485
@@ -2548,6 +2549,7 @@ void RendererCanvasRenderRD::_record_item_commands(const Item *p_item, RenderTar
25482549 r_current_batch = _new_batch (r_batch_broken);
25492550
25502551 r_current_batch->command_type = Item::Command::TYPE_POLYGON;
2552+ r_current_batch->has_blend = false ;
25512553 r_current_batch->command = c;
25522554
25532555 TextureState tex_state (polygon->texture , texture_filter, texture_repeat, false , use_linear_colors);
@@ -2585,6 +2587,7 @@ void RendererCanvasRenderRD::_record_item_commands(const Item *p_item, RenderTar
25852587 if (primitive->point_count != r_current_batch->primitive_points || r_current_batch->command_type != Item::Command::TYPE_PRIMITIVE) {
25862588 r_current_batch = _new_batch (r_batch_broken);
25872589 r_current_batch->command_type = Item::Command::TYPE_PRIMITIVE;
2590+ r_current_batch->has_blend = false ;
25882591 r_current_batch->command = c;
25892592 r_current_batch->primitive_points = primitive->point_count ;
25902593
@@ -2646,6 +2649,7 @@ void RendererCanvasRenderRD::_record_item_commands(const Item *p_item, RenderTar
26462649 r_current_batch = _new_batch (r_batch_broken);
26472650 r_current_batch->command = c;
26482651 r_current_batch->command_type = c->type ;
2652+ r_current_batch->has_blend = false ;
26492653
26502654 InstanceData *instance_data = nullptr ;
26512655
@@ -2799,6 +2803,7 @@ void RendererCanvasRenderRD::_render_batch(RD::DrawListID p_draw_list, PipelineV
27992803 RID pipeline = p_pipeline_variants->variants [p_batch->light_mode ][p_batch->pipeline_variant ].get_render_pipeline (RD::INVALID_ID, p_framebuffer_format);
28002804 RD::get_singleton ()->draw_list_bind_render_pipeline (p_draw_list, pipeline);
28012805 if (p_batch->has_blend ) {
2806+ DEV_ASSERT (p_batch->pipeline_variant == PIPELINE_VARIANT_QUAD_LCD_BLEND);
28022807 RD::get_singleton ()->draw_list_set_blend_constants (p_draw_list, p_batch->modulate );
28032808 }
28042809
0 commit comments