From 7721e19ccc8d71d0bacb7b57499853a6a3291ffa Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sun, 23 May 2021 19:10:26 +0200 Subject: Tweak default SDFGI settings for better quality - Enable Read Sky Light to get proper outdoors lighting out of the box. - Set bounce feedback to 0.5 by default to get a better quality result. - Higher values may cause infinite feedback with bright surfaces. - Increase the number of frames to converge to improve quality at the cost of latency. Most scenes are fairly static after all. - Use 75% Y scale by default as most scenes are not highly vertical. - Reorder the Y scale enum to go from the lowest Y scale to the highest. Also rename the "Disabled" setting to "100%" for clarity. --- servers/rendering/renderer_rd/renderer_scene_environment_rd.h | 6 +++--- servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp | 2 +- servers/rendering/renderer_rd/renderer_scene_gi_rd.h | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'servers/rendering/renderer_rd') diff --git a/servers/rendering/renderer_rd/renderer_scene_environment_rd.h b/servers/rendering/renderer_rd/renderer_scene_environment_rd.h index ed26fd467b..db7dd6b63c 100644 --- a/servers/rendering/renderer_rd/renderer_scene_environment_rd.h +++ b/servers/rendering/renderer_rd/renderer_scene_environment_rd.h @@ -138,12 +138,12 @@ public: int sdfgi_cascades = 6; float sdfgi_min_cell_size = 0.2; bool sdfgi_use_occlusion = false; - float sdfgi_bounce_feedback = 0.0; - bool sdfgi_read_sky_light = false; + float sdfgi_bounce_feedback = 0.5; + bool sdfgi_read_sky_light = true; float sdfgi_energy = 1.0; float sdfgi_normal_bias = 1.1; float sdfgi_probe_bias = 1.1; - RS::EnvironmentSDFGIYScale sdfgi_y_scale = RS::ENV_SDFGI_Y_SCALE_DISABLED; + RS::EnvironmentSDFGIYScale sdfgi_y_scale = RS::ENV_SDFGI_Y_SCALE_75_PERCENT; /// Adjustments diff --git a/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp index 3069b1c379..cb07c75db4 100644 --- a/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp @@ -46,7 +46,7 @@ void RendererSceneGIRD::SDFGI::create(RendererSceneEnvironmentRD *p_env, const V min_cell_size = p_env->sdfgi_min_cell_size; uses_occlusion = p_env->sdfgi_use_occlusion; y_scale_mode = p_env->sdfgi_y_scale; - static const float y_scale[3] = { 1.0, 1.5, 2.0 }; + static const float y_scale[3] = { 2.0, 1.5, 1.0 }; y_mult = y_scale[y_scale_mode]; cascades.resize(num_cascades); probe_axis_count = SDFGI::PROBE_DIVISOR + 1; diff --git a/servers/rendering/renderer_rd/renderer_scene_gi_rd.h b/servers/rendering/renderer_rd/renderer_scene_gi_rd.h index 5e55262798..d8a64bc672 100644 --- a/servers/rendering/renderer_rd/renderer_scene_gi_rd.h +++ b/servers/rendering/renderer_rd/renderer_scene_gi_rd.h @@ -504,12 +504,12 @@ public: RID cascades_ubo; bool uses_occlusion = false; - float bounce_feedback = 0.0; - bool reads_sky = false; + float bounce_feedback = 0.5; + bool reads_sky = true; float energy = 1.0; float normal_bias = 1.1; float probe_bias = 1.1; - RS::EnvironmentSDFGIYScale y_scale_mode = RS::ENV_SDFGI_Y_SCALE_DISABLED; + RS::EnvironmentSDFGIYScale y_scale_mode = RS::ENV_SDFGI_Y_SCALE_75_PERCENT; float y_mult = 1.0; @@ -536,7 +536,7 @@ public: }; RS::EnvironmentSDFGIRayCount sdfgi_ray_count = RS::ENV_SDFGI_RAY_COUNT_16; - RS::EnvironmentSDFGIFramesToConverge sdfgi_frames_to_converge = RS::ENV_SDFGI_CONVERGE_IN_10_FRAMES; + RS::EnvironmentSDFGIFramesToConverge sdfgi_frames_to_converge = RS::ENV_SDFGI_CONVERGE_IN_30_FRAMES; RS::EnvironmentSDFGIFramesToUpdateLight sdfgi_frames_to_update_light = RS::ENV_SDFGI_UPDATE_LIGHT_IN_4_FRAMES; float sdfgi_solid_cell_ratio = 0.25; -- cgit v1.2.3