1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Merge pull request #101952 from Flarkk/fix_spotlight_peterpanning_regression

Fix shadow peter-panning with default spotlight
This commit is contained in:
Rémi Verschelde
2025-02-07 01:39:15 +01:00
2 changed files with 3 additions and 3 deletions

View File

@@ -2510,7 +2510,7 @@ bool RendererSceneCull::_light_instance_update_shadow(Instance *p_instance, cons
}
real_t radius = RSG::light_storage->light_get_param(p_instance->base, RS::LIGHT_PARAM_RANGE);
real_t z_near = MIN(0.005f, radius);
real_t z_near = MIN(0.025f, radius);
Projection cm;
cm.set_perspective(90, 1, z_near, radius);
@@ -2600,7 +2600,7 @@ bool RendererSceneCull::_light_instance_update_shadow(Instance *p_instance, cons
real_t radius = RSG::light_storage->light_get_param(p_instance->base, RS::LIGHT_PARAM_RANGE);
real_t angle = RSG::light_storage->light_get_param(p_instance->base, RS::LIGHT_PARAM_SPOT_ANGLE);
real_t z_near = MIN(0.005f, radius);
real_t z_near = MIN(0.025f, radius);
Projection cm;
cm.set_perspective(angle * 2.0, 1.0, z_near, radius);