You've already forked godot
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:
@@ -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 = ∅
|
||||
render_data.reflection_probes = ∅
|
||||
render_data.voxel_gi_instances = ∅
|
||||
}
|
||||
|
||||
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 = ∅
|
||||
}
|
||||
|
||||
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());
|
||||
|
||||
Reference in New Issue
Block a user