mirror of
https://github.com/godotengine/godot
synced 2024-09-05 22:01:38 +00:00
Merge pull request #92763 from markdibarry/parallax2d_cull_fix
Fix incorrect cull boundary for scaled and repeated Parallax2D children
This commit is contained in:
commit
7571f82bea
|
@ -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 a new issue