From a9beb7aa8c9e81c57ff4c9753c846bf14c5a1620 Mon Sep 17 00:00:00 2001 From: reduz Date: Sun, 24 Jan 2021 16:00:20 -0300 Subject: Shadow map rendering optimization -All shadow rendering is done with raster now (no compute) -All shadow rendering is done by rendering directly to the shadow atlas -Improved how buffer clearing is done to optimize the above. -Ability to set shadows as 16 bits. --- editor/plugins/node_3d_editor_plugin.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'editor/plugins') diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 7717a9a27e..4fb0013620 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -2445,12 +2445,14 @@ void Node3DEditorViewport::_notification(int p_what) { //update shadow atlas if changed int shadowmap_size = ProjectSettings::get_singleton()->get("rendering/quality/shadow_atlas/size"); + bool shadowmap_16_bits = ProjectSettings::get_singleton()->get("rendering/quality/shadow_atlas/16_bits"); int atlas_q0 = ProjectSettings::get_singleton()->get("rendering/quality/shadow_atlas/quadrant_0_subdiv"); int atlas_q1 = ProjectSettings::get_singleton()->get("rendering/quality/shadow_atlas/quadrant_1_subdiv"); int atlas_q2 = ProjectSettings::get_singleton()->get("rendering/quality/shadow_atlas/quadrant_2_subdiv"); int atlas_q3 = ProjectSettings::get_singleton()->get("rendering/quality/shadow_atlas/quadrant_3_subdiv"); viewport->set_shadow_atlas_size(shadowmap_size); + viewport->set_shadow_atlas_16_bits(shadowmap_16_bits); viewport->set_shadow_atlas_quadrant_subdiv(0, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q0)); viewport->set_shadow_atlas_quadrant_subdiv(1, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q1)); viewport->set_shadow_atlas_quadrant_subdiv(2, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q2)); -- cgit v1.2.3