From 216c9a6bd9a62750d786a2c500248d7a2b3b8a9c Mon Sep 17 00:00:00 2001 From: tactical-fluke Date: Tue, 30 Apr 2024 11:21:00 +0800 Subject: [PATCH] Fix SDFGI being used in unshaded debug draw Fixes #62758 --- .../renderer_rd/forward_clustered/render_forward_clustered.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp index c7ab7ea4626..2df03316888 100644 --- a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp +++ b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp @@ -1706,7 +1706,7 @@ void RenderForwardClustered::_render_scene(RenderDataRD *p_render_data, const Co } if (p_render_data->environment.is_valid()) { - if (environment_get_sdfgi_enabled(p_render_data->environment)) { + if (environment_get_sdfgi_enabled(p_render_data->environment) && get_debug_draw_mode() != RS::VIEWPORT_DEBUG_DRAW_UNSHADED) { using_sdfgi = true; } if (environment_get_ssr_enabled(p_render_data->environment)) {