From 44af98cd1258d7f045c1f10634c711ebd0d838e0 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sat, 19 Jun 2021 11:51:51 +0200 Subject: [PATCH] Compute SSAO at half resolution by default This provides a significant speedup for a small quality loss. The quality loss is generally more noticeable during a project's early stages of development (e.g. in level blockouts) than it is in a finished project. --- doc/classes/ProjectSettings.xml | 7 ++----- servers/rendering_server.cpp | 3 +-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 4b5f7b20910..0d43494ea91 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1643,11 +1643,8 @@ Distance at which the screen-space ambient occlusion is fully faded out. Use this hide ambient occlusion at great distances. - - If [code]true[/code], screen-space ambient occlusion will be rendered at half size and then upscaled before being added to the scene. This is significantly faster but may miss small details. - - - Lower-end override for [member rendering/environment/ssao/half_size] on mobile devices, due to performance concerns. + + If [code]true[/code], screen-space ambient occlusion will be rendered at half size and then upscaled before being added to the scene. This is significantly faster but may miss small details. If [code]false[/code], screen-space ambient occlusion will be rendered at full size. Sets the quality of the screen-space ambient occlusion effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]ULTRA[/code] will use the [member rendering/environment/ssao/adaptive_target] setting. diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index 20372681348..e5bcffc0082 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -2896,8 +2896,7 @@ RenderingServer::RenderingServer() { GLOBAL_DEF("rendering/environment/ssao/quality", 2); ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssao/quality", PropertyInfo(Variant::INT, "rendering/environment/ssao/quality", PROPERTY_HINT_ENUM, "Very Low (Fast),Low (Fast),Medium (Average),High (Slow),Ultra (Custom)")); - GLOBAL_DEF("rendering/environment/ssao/half_size", false); - GLOBAL_DEF("rendering/environment/ssao/half_size.mobile", true); + GLOBAL_DEF("rendering/environment/ssao/half_size", true); GLOBAL_DEF("rendering/environment/ssao/adaptive_target", 0.5); ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssao/adaptive_target", PropertyInfo(Variant::FLOAT, "rendering/environment/ssao/adaptive_target", PROPERTY_HINT_RANGE, "0.0,1.0,0.01")); GLOBAL_DEF("rendering/environment/ssao/blur_passes", 2);