mirror of
https://github.com/godotengine/godot.git
synced 2025-10-25 18:54:43 +00:00
Fix rounding error in Clip Content
Rounds the position and size of the final clip rect to avoid flickering issues. Fixes https://github.com/godotengine/godot/issues/46493
This commit is contained in:
parent
8faecd6a47
commit
c3d8538bb4
1 changed files with 2 additions and 0 deletions
|
|
@ -148,6 +148,8 @@ void RendererCanvasCull::_cull_canvas_item(Item *p_canvas_item, const Transform2
|
||||||
} else {
|
} else {
|
||||||
ci->final_clip_rect = global_rect;
|
ci->final_clip_rect = global_rect;
|
||||||
}
|
}
|
||||||
|
ci->final_clip_rect.position = ci->final_clip_rect.position.round();
|
||||||
|
ci->final_clip_rect.size = ci->final_clip_rect.size.round();
|
||||||
ci->final_clip_owner = ci;
|
ci->final_clip_owner = ci;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue