From b3afc74115b4a3d17e56081303c2be08f5d1851b Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Fri, 17 Oct 2025 01:06:39 +0200 Subject: [PATCH] Document occlusion debugging in the SDFGI debug probes draw mode in the editor This feature shows occlusion information for the selected SDFGI probe. It can only be used in the editor, as it relies on the `RenderingServer::sdfgi_set_debug_probe_select()` method that isn't exposed to the scripting API. --- doc/classes/RenderingServer.xml | 1 + doc/classes/Viewport.xml | 1 + editor/scene/3d/node_3d_editor_plugin.cpp | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 825d26dc98d..50dbb3259c4 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -5333,6 +5333,7 @@ Draws SDFGI probe data. This is the data structure that is used to give indirect lighting dynamic objects moving within the scene. + When in the editor, left-clicking a probe will display additional bright dots that show its occlusion information. A white dot means the light is not occluded at all at the dot's position, while a red dot means the light is fully occluded. Intermediate values are possible. [b]Note:[/b] Only supported when using the Forward+ rendering method. diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index d6a30050564..5539fad0b75 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -712,6 +712,7 @@ Draws the probes used for signed distance field global illumination (SDFGI). + When in the editor, left-clicking a probe will display additional bright dots that show its occlusion information. A white dot means the light is not occluded at all at the dot's position, while a red dot means the light is fully occluded. Intermediate values are possible. Does nothing if the current environment's [member Environment.sdfgi_enabled] is [code]false[/code]. [b]Note:[/b] Only supported when using the Forward+ rendering method. diff --git a/editor/scene/3d/node_3d_editor_plugin.cpp b/editor/scene/3d/node_3d_editor_plugin.cpp index eea4a9703cc..b60a2ac704f 100644 --- a/editor/scene/3d/node_3d_editor_plugin.cpp +++ b/editor/scene/3d/node_3d_editor_plugin.cpp @@ -6148,7 +6148,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p _add_advanced_debug_draw_mode_item(display_submenu, TTRC("SDFGI Cascades"), VIEW_DISPLAY_DEBUG_SDFGI, SupportedRenderingMethods::FORWARD_PLUS, TTRC("Requires SDFGI to be enabled in Environment to have a visible effect.")); _add_advanced_debug_draw_mode_item(display_submenu, TTRC("SDFGI Probes"), VIEW_DISPLAY_DEBUG_SDFGI_PROBES, SupportedRenderingMethods::FORWARD_PLUS, - TTRC("Requires SDFGI to be enabled in Environment to have a visible effect.")); + TTRC("Left-click a SDFGI probe to display its occlusion information (white = not occluded, red = fully occluded).\nRequires SDFGI to be enabled in Environment to have a visible effect.")); display_submenu->add_separator(); _add_advanced_debug_draw_mode_item(display_submenu, TTRC("Scene Luminance"), VIEW_DISPLAY_DEBUG_SCENE_LUMINANCE, SupportedRenderingMethods::FORWARD_PLUS_MOBILE, TTRC("Displays the scene luminance computed from the 3D buffer. This is used for Auto Exposure calculation.\nRequires Auto Exposure to be enabled in CameraAttributes to have a visible effect."));