Eevee: SSR: Only fade based on reflected pixel position

Not on reflector pixel position. This improve the feel of SSRs and the
final render quality.
This commit is contained in:
Clément Foucault 2018-11-16 14:02:53 +01:00
parent 1f458895f8
commit b24b1ec74b
1 changed files with 1 additions and 2 deletions

View File

@ -237,12 +237,11 @@ vec3 get_hit_vector(
}
else {
/* Find hit position in previous frame. */
mask = screen_border_mask(gl_FragCoord.xy / vec2(textureSize(depthBuffer, 0)));
hit_co = get_reprojected_reflection(hit_pos, worldPosition, N);
hit_vec = hit_pos - worldPosition;
}
mask = min(mask, screen_border_mask(hit_co));
mask = screen_border_mask(hit_co);
return hit_vec;
}