浏览代码

Fix debanding not being used in the 2D editor when enabled in Project Settings

Hugo Locurcio 1 月之前
父节点
当前提交
005ceee84a
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      editor/editor_node.cpp

+ 5 - 0
editor/editor_node.cpp

@@ -510,6 +510,11 @@ void EditorNode::_update_from_settings() {
 	Viewport::MSAA msaa = Viewport::MSAA(int(GLOBAL_GET("rendering/anti_aliasing/quality/msaa_2d")));
 	scene_root->set_msaa_2d(msaa);
 
+	// 2D doesn't use a dedicated SubViewport like 3D does, so we apply it on the root viewport instead.
+	bool use_debanding = GLOBAL_GET("rendering/anti_aliasing/quality/use_debanding");
+	scene_root->set_use_debanding(use_debanding);
+	get_viewport()->set_use_debanding(use_debanding);
+
 	bool use_hdr_2d = GLOBAL_GET("rendering/viewport/hdr_2d");
 	scene_root->set_use_hdr_2d(use_hdr_2d);
 	get_viewport()->set_use_hdr_2d(use_hdr_2d);