Merge pull request #38954 from puchik/ssr-far-clip

Check if screen space reflection has passed far clip
This commit is contained in:
Rémi Verschelde 2020-10-18 20:48:44 +02:00 committed by GitHub
commit 4a92d2111b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;