Godot Engine – Multi-platform 2D and 3D game engine
Fix PCSS shadows using shadow range begin in the wrong space.
Skyth5afc91103c4b
diff --git a/servers/rendering/renderer_scene_cull.cpp b/servers/rendering/renderer_scene_cull.cppindex efe4de27205..5717e6aeeb6 100644--- a/servers/rendering/renderer_scene_cull.cpp+++ b/servers/rendering/renderer_scene_cull.cpp@@ -2358,7 +2358,7 @@ void RendererSceneCull::_light_instance_setup_directional_shadow(int p_shadow_incull.shadows[p_shadow_index].cascades[i].split = distances[i + 1];cull.shadows[p_shadow_index].cascades[i].shadow_texel_size = radius * 2.0 / texture_size;cull.shadows[p_shadow_index].cascades[i].bias_scale = (z_max - z_min_cam);- cull.shadows[p_shadow_index].cascades[i].range_begin = z_max;+ cull.shadows[p_shadow_index].cascades[i].range_begin = z_max - z_vec.dot(p_cam_transform.origin);cull.shadows[p_shadow_index].cascades[i].uv_scale = uv_scale;}}