summaryrefslogtreecommitdiff
path: root/scene/main/scene_tree.cpp
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2020-10-29 18:09:16 -0300
committerreduz <reduzio@gmail.com>2020-10-30 08:57:32 -0300
commit0e6664539d2644e630df111426b637dc8ff7a271 (patch)
tree77dfee623c94a689ae396320dd5d79a464352ae6 /scene/main/scene_tree.cpp
parentdebb67918e8644b975a929c0bdeff7922364f314 (diff)
Refactor pixel snapping.
-Rename pixel_snap to snap_2d_to_vertices -Added snap_2d_to_transforms which is more useful Fixes #41814 Solves proposal https://github.com/godotengine/godot-proposals/issues/1666 Supersedes #35606, supersedes #41535, supersedes #41534
Diffstat (limited to 'scene/main/scene_tree.cpp')
-rw-r--r--scene/main/scene_tree.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index ea0fe6fcc2..40479a796f 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -1394,6 +1394,12 @@ SceneTree::SceneTree() {
const bool use_debanding = GLOBAL_DEF("rendering/quality/screen_filters/use_debanding", false);
root->set_use_debanding(use_debanding);
+ bool snap_2d_transforms = GLOBAL_DEF("rendering/quality/2d/snap_2d_transforms_to_pixel", false);
+ root->set_snap_2d_transforms_to_pixel(snap_2d_transforms);
+
+ bool snap_2d_vertices = GLOBAL_DEF("rendering/quality/2d/snap_2d_vertices_to_pixel", false);
+ root->set_snap_2d_vertices_to_pixel(snap_2d_vertices);
+
{ //load default fallback environment
//get possible extensions
List<String> exts;