Skip to content

Commit

Permalink
Add cull fix for scale repeat
Browse files Browse the repository at this point in the history
  • Loading branch information
markdibarry committed Jun 4, 2024
1 parent 7b63ac4 commit f0983f1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions servers/rendering/renderer_canvas_cull.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,9 @@ void RendererCanvasCull::_cull_canvas_item(Item *p_canvas_item, const Transform2
ci->repeat_times = repeat_times;

if (repeat_size.x || repeat_size.y) {
rect.size += repeat_size * repeat_times / final_xform.get_scale();
rect.position -= repeat_size * (repeat_times / 2);
Size2 scale = final_xform.get_scale();
rect.size += repeat_size * repeat_times / scale;
rect.position -= repeat_size / scale * (repeat_times / 2);
}
}

Expand Down

0 comments on commit f0983f1

Please sign in to comment.