Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if screen space reflection has passed far clip #38954

Merged
merged 1 commit into from
Oct 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Check if screen space reflection has passed far clip
Before "accepting" the reflection, check if it's within our view (prevent tracing environment and creating artifacts).
  • Loading branch information
puchik committed Jun 4, 2020
commit 48ffd3d1577ab706355e36161cf3ae7c8fd9ec6c
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