Skip to content

Commit

Permalink
Merge pull request #38954 from puchik/ssr-far-clip
Browse files Browse the repository at this point in the history
Check if screen space reflection has passed far clip
  • Loading branch information
akien-mga authored Oct 18, 2020
2 parents 8ca98dd + 48ffd3d commit 4a92d21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gles3/shaders/screen_space_reflection.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ void main() {

if (depth > z_to) {
// if depth was surpassed
if (depth <= max(z_to, z_from) + depth_tolerance) {
// check the depth tolerance
if ((depth <= max(z_to, z_from) + depth_tolerance) && (-depth < camera_z_far)) {
// check the depth tolerance and far clip
found = true;
}
break;
Expand Down

0 comments on commit 4a92d21

Please sign in to comment.