Skip to content

Commit 4edf269

Browse files
committed
Fix incorrect depth comparison used to calculate volumetric fog shadowing
1 parent 5e59717 commit 4edf269

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

servers/rendering/renderer_rd/shaders/environment/volumetric_fog_process.glsl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,7 @@ void main() {
513513
shadow_sample.z = 1.0 + abs(shadow_sample.z);
514514
vec3 pos = vec3(shadow_sample.xy / shadow_sample.z, shadow_len - omni_lights.data[light_index].shadow_bias);
515515
pos.z *= omni_lights.data[light_index].inv_radius;
516+
pos.z = 1.0 - pos.z;
516517

517518
pos.xy = pos.xy * 0.5 + 0.5;
518519
pos.xy = uv_rect.xy + pos.xy * uv_rect.zw;

0 commit comments

Comments
 (0)