mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 13:12:42 +00:00
Merge pull request #98226 from m-pranav-r/fix-volumetric-shadows
Fix incorrect depth comparison used to calculate volumetric fog shadowing
This commit is contained in:
commit
c145e85011
@ -513,6 +513,7 @@ void main() {
|
||||
shadow_sample.z = 1.0 + abs(shadow_sample.z);
|
||||
vec3 pos = vec3(shadow_sample.xy / shadow_sample.z, shadow_len - omni_lights.data[light_index].shadow_bias);
|
||||
pos.z *= omni_lights.data[light_index].inv_radius;
|
||||
pos.z = 1.0 - pos.z;
|
||||
|
||||
pos.xy = pos.xy * 0.5 + 0.5;
|
||||
pos.xy = uv_rect.xy + pos.xy * uv_rect.zw;
|
||||
|
Loading…
Reference in New Issue
Block a user