mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 07:53:26 +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:
commit
6efa557e9b
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue