From 46ed290fef8b5fad54dd0ba46d99b6b9b392248c Mon Sep 17 00:00:00 2001 From: jsjtxietian Date: Thu, 18 Jul 2024 12:10:18 +0800 Subject: [PATCH] Add warning when use FSR1 on renderer other than forward plus --- servers/rendering/renderer_viewport.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/servers/rendering/renderer_viewport.cpp b/servers/rendering/renderer_viewport.cpp index 80c1f67d8a6..10e295ab04d 100644 --- a/servers/rendering/renderer_viewport.cpp +++ b/servers/rendering/renderer_viewport.cpp @@ -899,6 +899,7 @@ void RendererViewport::viewport_set_use_xr(RID p_viewport, bool p_use_xr) { void RendererViewport::viewport_set_scaling_3d_mode(RID p_viewport, RS::ViewportScaling3DMode p_mode) { Viewport *viewport = viewport_owner.get_or_null(p_viewport); ERR_FAIL_NULL(viewport); + ERR_FAIL_COND_EDMSG(p_mode == RS::VIEWPORT_SCALING_3D_MODE_FSR && OS::get_singleton()->get_current_rendering_method() != "forward_plus", "FSR1 is only available when using the Forward+ renderer."); ERR_FAIL_COND_EDMSG(p_mode == RS::VIEWPORT_SCALING_3D_MODE_FSR2 && OS::get_singleton()->get_current_rendering_method() != "forward_plus", "FSR2 is only available when using the Forward+ renderer."); if (viewport->scaling_3d_mode == p_mode) {