EEVEE: Screen Space Reflection: Improve contact reflections
This patch helps the case of intricate reflections where the ray does not travel far before intersecting the geometry. In these cases there could be false negative exclusion of the ray caused by the backface rejection threshold.
This commit is contained in:
@@ -235,9 +235,10 @@ vec3 raycast(int index,
|
||||
#endif
|
||||
}
|
||||
|
||||
if (discard_backface) {
|
||||
/* Discard backface hits */
|
||||
hit = hit && (prev_delta > 0.0);
|
||||
/* Discard backface hits. Only do this if the ray traveled enough to avoid loosing intricate
|
||||
* contact reflections. This is only used for SSReflections. */
|
||||
if (discard_backface && prev_delta < 0.0 && curr_time > 4.1) {
|
||||
hit = false;
|
||||
}
|
||||
|
||||
/* Reject hit if background. */
|
||||
|
||||
Reference in New Issue
Block a user