summaryrefslogtreecommitdiff
path: root/scene/3d/light.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/light.cpp')
-rw-r--r--scene/3d/light.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp
index b4a4cf70bb..9c87acec6e 100644
--- a/scene/3d/light.cpp
+++ b/scene/3d/light.cpp
@@ -234,7 +234,7 @@ void Light::_bind_methods() {
BIND_CONSTANT(PARAM_SHADOW_SPLIT_3_OFFSET);
BIND_CONSTANT(PARAM_SHADOW_NORMAL_BIAS);
BIND_CONSTANT(PARAM_SHADOW_BIAS);
- BIND_CONSTANT(PARAM_SHADOW_BIAS_SPLIT_SCALE);
+
BIND_CONSTANT(PARAM_MAX);
}
@@ -262,8 +262,7 @@ Light::Light(VisualServer::LightType p_type) {
set_param(PARAM_SHADOW_SPLIT_2_OFFSET, 0.2);
set_param(PARAM_SHADOW_SPLIT_3_OFFSET, 0.5);
set_param(PARAM_SHADOW_NORMAL_BIAS, 0.0);
- set_param(PARAM_SHADOW_BIAS, 0.);
- set_param(PARAM_SHADOW_BIAS_SPLIT_SCALE, 0.1);
+ set_param(PARAM_SHADOW_BIAS, 0.15);
}
Light::Light() {
@@ -318,7 +317,6 @@ void DirectionalLight::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_split_3", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_3_OFFSET);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "directional_shadow_blend_splits"), "set_blend_splits", "is_blend_splits_enabled");
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_normal_bias", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_param", "get_param", PARAM_SHADOW_NORMAL_BIAS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_bias_split_scale", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_param", "get_param", PARAM_SHADOW_BIAS_SPLIT_SCALE);
BIND_CONSTANT(SHADOW_ORTHOGONAL);
BIND_CONSTANT(SHADOW_PARALLEL_2_SPLITS);
@@ -328,8 +326,11 @@ void DirectionalLight::_bind_methods() {
DirectionalLight::DirectionalLight()
: Light(VisualServer::LIGHT_DIRECTIONAL) {
- set_param(PARAM_SHADOW_NORMAL_BIAS, 0.1);
+ set_param(PARAM_SHADOW_NORMAL_BIAS, 0.2);
+ set_param(PARAM_SHADOW_BIAS, 1.0);
+ set_param(PARAM_SHADOW_MAX_DISTANCE, 200);
set_shadow_mode(SHADOW_PARALLEL_4_SPLITS);
+
blend_splits = false;
}