diff options
author | Thaddeus Crews <repiteo@outlook.com> | 2024-10-21 16:39:11 -0500 |
---|---|---|
committer | Thaddeus Crews <repiteo@outlook.com> | 2024-10-21 16:39:11 -0500 |
commit | c145e850114fd52b8ddabfc2e6304bc0d83d835e (patch) | |
tree | 9ccd3e89daa91100982f9b1344fc50fc3e748310 /servers/rendering/renderer_rd | |
parent | ecc2eb73fc7532b7352274fb8145850bafaf6c20 (diff) | |
parent | c12001a9dc4c9d035d92b173ade61596ce47b068 (diff) | |
download | redot-engine-c145e850114fd52b8ddabfc2e6304bc0d83d835e.tar.gz |
Merge pull request #98226 from m-pranav-r/fix-volumetric-shadows
Fix incorrect depth comparison used to calculate volumetric fog shadowing
Diffstat (limited to 'servers/rendering/renderer_rd')
-rw-r--r-- | servers/rendering/renderer_rd/shaders/environment/volumetric_fog_process.glsl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/shaders/environment/volumetric_fog_process.glsl b/servers/rendering/renderer_rd/shaders/environment/volumetric_fog_process.glsl index a797891ab6..90bbdfe685 100644 --- a/servers/rendering/renderer_rd/shaders/environment/volumetric_fog_process.glsl +++ b/servers/rendering/renderer_rd/shaders/environment/volumetric_fog_process.glsl @@ -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; |