1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-05 17:15:09 +00:00

Merge pull request #109567 from Flarkk/fix_spotlight_fog

Fix spotlight's shadow peter-panning with volumetric fog
This commit is contained in:
Thaddeus Crews
2025-09-16 11:44:55 -05:00

View File

@@ -559,7 +559,7 @@ void main() {
vec4 v = vec4(view_pos, 1.0);
vec4 splane = (spot_lights.data[light_index].shadow_matrix * v);
splane.z -= spot_lights.data[light_index].shadow_bias / (d * spot_lights.data[light_index].inv_radius);
splane.z -= spot_lights.data[light_index].shadow_bias;
splane /= splane.w;
vec3 pos = vec3(splane.xy * spot_lights.data[light_index].atlas_rect.zw + spot_lights.data[light_index].atlas_rect.xy, splane.z);