summaryrefslogtreecommitdiffstats
path: root/servers/rendering/renderer_viewport.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2024-02-12 23:53:51 +0100
committerGitHub <noreply@github.com>2024-02-12 23:53:51 +0100
commit9050ee1542f4e071188e8e4f868f3507bb31b3dc (patch)
treebb5788b5f23e8a76de753bc1c27de944e9644437 /servers/rendering/renderer_viewport.cpp
parente57fee996248f2b854445caee6c0c8bc0d585bec (diff)
parent35b640107fbcae4811ab1b4011644626eee33813 (diff)
downloadredot-engine-9050ee1542f4e071188e8e4f868f3507bb31b3dc.tar.gz
Merge pull request #87297 from adamscott/2d-pixel-art-stability
Stabilize snapping 2D transforms to pixel
Diffstat (limited to 'servers/rendering/renderer_viewport.cpp')
-rw-r--r--servers/rendering/renderer_viewport.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/servers/rendering/renderer_viewport.cpp b/servers/rendering/renderer_viewport.cpp
index 5bc5f333df..445a1b265e 100644
--- a/servers/rendering/renderer_viewport.cpp
+++ b/servers/rendering/renderer_viewport.cpp
@@ -43,19 +43,11 @@ static Transform2D _canvas_get_transform(RendererViewport::Viewport *p_viewport,
float scale = 1.0;
if (p_viewport->canvas_map.has(p_canvas->parent)) {
Transform2D c_xform = p_viewport->canvas_map[p_canvas->parent].transform;
- if (p_viewport->snap_2d_transforms_to_pixel) {
- c_xform.columns[2] = c_xform.columns[2].floor();
- }
xf = xf * c_xform;
scale = p_canvas->parent_scale;
}
Transform2D c_xform = p_canvas_data->transform;
-
- if (p_viewport->snap_2d_transforms_to_pixel) {
- c_xform.columns[2] = c_xform.columns[2].floor();
- }
-
xf = xf * c_xform;
if (scale != 1.0 && !RSG::canvas->disable_scale) {