From c3d8538bb42f58aed598e361aa23fb1f6fd3d01a Mon Sep 17 00:00:00 2001 From: asheraryam Date: Tue, 2 Mar 2021 18:36:28 +0300 Subject: [PATCH] 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 --- servers/rendering/renderer_canvas_cull.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/servers/rendering/renderer_canvas_cull.cpp b/servers/rendering/renderer_canvas_cull.cpp index e34bc9acb81..081154aa1d2 100644 --- a/servers/rendering/renderer_canvas_cull.cpp +++ b/servers/rendering/renderer_canvas_cull.cpp @@ -148,6 +148,8 @@ void RendererCanvasCull::_cull_canvas_item(Item *p_canvas_item, const Transform2 } else { 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; } else {