From ce8a54b634318c09f78275ffd65217769ffdf5aa Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Wed, 17 Jul 2019 19:44:00 +0200 Subject: [PATCH] Lower the default directional shadow maximum distance to 100 With the default camera node settings, this makes directional shadows look consistent between the editor and the running project. The original issue occurs because the editor camera defaults to a Z-far value of 500, whereas the Camera node defaults to a Z-far value of 100. Since the directional shadow maximum distance is clamped to the Z-far value, it caused the running project's effective shadow distance to be lower compared to the editor (100 instead of 200). This partially addresses #13575. --- scene/3d/light.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp index 4ef945ab8db..91595657b13 100644 --- a/scene/3d/light.cpp +++ b/scene/3d/light.cpp @@ -413,7 +413,7 @@ DirectionalLight::DirectionalLight() : set_param(PARAM_SHADOW_NORMAL_BIAS, 0.8); set_param(PARAM_SHADOW_BIAS, 0.1); - set_param(PARAM_SHADOW_MAX_DISTANCE, 200); + set_param(PARAM_SHADOW_MAX_DISTANCE, 100); set_param(PARAM_SHADOW_BIAS_SPLIT_SCALE, 0.25); set_shadow_mode(SHADOW_PARALLEL_4_SPLITS); set_shadow_depth_range(SHADOW_DEPTH_RANGE_STABLE);