From fed764b342e3e26ddbc2779c884f03cf7cb98060 Mon Sep 17 00:00:00 2001 From: lawnjelly Date: Mon, 2 Nov 2020 10:13:18 +0000 Subject: [PATCH] Fix editor constant redraw from fxaa and debanding. Every NOTIFICATION_PROCESS the spatial_editor_plugin.cpp is calling set_use_fxaa which is causing a redraw_request(). Same with debanding. These can be fixed be checking for noop state changes. --- scene/main/viewport.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 10633091308..14db00af853 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -3020,6 +3020,9 @@ Viewport::MSAA Viewport::get_msaa() const { void Viewport::set_use_fxaa(bool p_fxaa) { + if (p_fxaa == use_fxaa) { + return; + } use_fxaa = p_fxaa; VS::get_singleton()->viewport_set_use_fxaa(viewport, use_fxaa); } @@ -3031,6 +3034,9 @@ bool Viewport::get_use_fxaa() const { void Viewport::set_use_debanding(bool p_debanding) { + if (p_debanding == use_debanding) { + return; + } use_debanding = p_debanding; VS::get_singleton()->viewport_set_use_debanding(viewport, use_debanding); }