mirror of
https://github.com/godotengine/godot.git
synced 2025-01-06 17:37:18 +08:00
Add cull fix for scale repeat
This commit is contained in:
parent
7b63ac488e
commit
f0983f1b1c
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user