EEVEE: ScreenSpaceReflections: Increase depth threshold

This avoids going through geometry when ray have certain angle.
This commit is contained in:
Clément Foucault 2021-03-13 10:12:12 +01:00
parent bbc5e26051
commit b79f209041
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ bool raytrace(Ray ray,
/* Check if the ray is below the surface ... */
hit = (delta < 0.0);
/* ... and above it with the added thickness. */
hit = hit && (delta > ss_p.z - ss_p.w || abs(delta) < abs(ssray.direction.z * stride));
hit = hit && (delta > ss_p.z - ss_p.w || abs(delta) < abs(ssray.direction.z * stride * 2.0));
}
/* Discard backface hits. */
hit = hit && !(discard_backface && prev_delta < 0.0);