1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Make Overdraw, Lighting and Shadow Splits debug draw modes ignore decals

This also makes the Overdraw and Shadow Splits debug draw modes ignore fog.
The Lighting debug draw mode still displays fog as that debug draw mode
is intended to preview scene lighting, and fog has an impact on how
lighting is perceived.
This commit is contained in:
Hugo Locurcio
2024-03-07 17:40:19 +01:00
parent aef11a1427
commit 26a220bd31
4 changed files with 21 additions and 14 deletions

View File

@@ -1153,12 +1153,19 @@ void RendererSceneRenderRD::render_scene(const Ref<RenderSceneBuffers> &p_render
PagedArray<RID> empty;
if (get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_UNSHADED) {
if (get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_UNSHADED || get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_OVERDRAW) {
render_data.lights = &empty;
render_data.reflection_probes = &empty;
render_data.voxel_gi_instances = &empty;
}
if (get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_UNSHADED ||
get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_OVERDRAW ||
get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_LIGHTING ||
get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_PSSM_SPLITS) {
render_data.decals = &empty;
}
Color clear_color;
if (p_render_buffers.is_valid() && p_reflection_probe.is_null()) {
clear_color = texture_storage->render_target_get_clear_request_color(rb->get_render_target());