Browse Source

Fix Y-sorted root item having modulation applied twice

kleonc 6 months ago
parent
commit
24b502b13a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      servers/rendering/renderer_canvas_cull.cpp

+ 1 - 1
servers/rendering/renderer_canvas_cull.cpp

@@ -434,7 +434,7 @@ void RendererCanvasCull::_cull_canvas_item(Item *p_canvas_item, const Transform2
 			child_items = (Item **)alloca(child_item_count * sizeof(Item *));
 			child_items = (Item **)alloca(child_item_count * sizeof(Item *));
 
 
 			ci->ysort_xform = Transform2D();
 			ci->ysort_xform = Transform2D();
-			ci->ysort_modulate = Color(1, 1, 1, 1);
+			ci->ysort_modulate = Color(1, 1, 1, 1) / ci->modulate;
 			ci->ysort_index = 0;
 			ci->ysort_index = 0;
 			ci->ysort_parent_abs_z_index = parent_z;
 			ci->ysort_parent_abs_z_index = parent_z;
 			child_items[0] = ci;
 			child_items[0] = ci;