Skip to content

Commit

Permalink
Fix incorrect depth comparison used to calculate volumetric fog shado…
Browse files Browse the repository at this point in the history
…wing
  • Loading branch information
m-pranav-r committed Oct 16, 2024
1 parent af77100 commit c12001a
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c12001a

Please sign in to comment.