Fix PCSS shadows using shadow range begin in the wrong space.

(cherry picked from commit 5afc91103c4ba88c668b42a887742ea81ee6d009)
This commit is contained in:
Skyth authored and Thaddeus Crews committed 2026-07-25 13:19:49 -05:00
1 parent 1cb4bb5817
commit 83713504e4
1 file changed
+1 -1
+1 -1
View File
@@ -2358,7 +2358,7 @@ void RendererSceneCull::_light_instance_setup_directional_shadow(int p_shadow_in
cull.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;
}
}