Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2021-03-10 19:53:08 +0300
committerClément Foucault <foucault.clem@gmail.com>2021-03-10 19:57:09 +0300
commit4cd9a1164b5a184ca957b977f27584ec61cc3ac6 (patch)
tree08e7b7d2db0b375e1a84f52e5c9611a38b2bf513 /source/blender/draw
parent352385d1097adf7c7bc147a31c1608795873ac21 (diff)
EEVEE: ScreenSpaceReflections: Improve minimal hit threshold
This makes the hit delta threshold dependant on the ray angle. If the ray is more aligned with the view, its intersection threshold gets bigger to avoid going through geometry. This improves reflections and fix T86448 refraction issue.
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl b/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl
index c47a8bdc4e9..8975397b62a 100644
--- a/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl
+++ b/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl
@@ -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);
+ hit = hit && (delta > ss_p.z - ss_p.w || abs(delta) < abs(ssray.direction.z * stride));
}
/* Discard backface hits. */
hit = hit && !(discard_backface && prev_delta < 0.0);