You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-06 17:25:19 +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:
@@ -559,7 +559,7 @@ void main() {
|
|||||||
vec4 v = vec4(view_pos, 1.0);
|
vec4 v = vec4(view_pos, 1.0);
|
||||||
|
|
||||||
vec4 splane = (spot_lights.data[light_index].shadow_matrix * v);
|
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;
|
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);
|
vec3 pos = vec3(splane.xy * spot_lights.data[light_index].atlas_rect.zw + spot_lights.data[light_index].atlas_rect.xy, splane.z);
|
||||||
|
|||||||
Reference in New Issue
Block a user