소스 검색

Merge pull request #43272 from lawnjelly/fxaa_deband_redraw

Fix editor constant redraw from fxaa and debanding.
Rémi Verschelde 4 년 전
부모
커밋
df6d845b25
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      scene/main/viewport.cpp

+ 6 - 0
scene/main/viewport.cpp

@@ -3020,6 +3020,9 @@ Viewport::MSAA Viewport::get_msaa() const {
 
 
 void Viewport::set_use_fxaa(bool p_fxaa) {
 void Viewport::set_use_fxaa(bool p_fxaa) {
 
 
+	if (p_fxaa == use_fxaa) {
+		return;
+	}
 	use_fxaa = p_fxaa;
 	use_fxaa = p_fxaa;
 	VS::get_singleton()->viewport_set_use_fxaa(viewport, use_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) {
 void Viewport::set_use_debanding(bool p_debanding) {
 
 
+	if (p_debanding == use_debanding) {
+		return;
+	}
 	use_debanding = p_debanding;
 	use_debanding = p_debanding;
 	VS::get_singleton()->viewport_set_use_debanding(viewport, use_debanding);
 	VS::get_singleton()->viewport_set_use_debanding(viewport, use_debanding);
 }
 }