diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-06 23:22:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-06 23:22:15 +0100 |
commit | 3ae38edc8e09a97578fc93e11399e635cd82b15c (patch) | |
tree | fbdf75c444ba74007e649d829f864d2595f9de3a /servers/rendering/renderer_rd/shaders | |
parent | 61dd3136fc19fb752f140c1942f32b1517373a42 (diff) | |
parent | d6c7d4ab5dd27311adbc340a857b1a6930324749 (diff) |
Merge pull request #56844 from Calinou/ssr-fix-background-line-master
Fix visible background line in intersections in screen-space reflections
Diffstat (limited to 'servers/rendering/renderer_rd/shaders')
-rw-r--r-- | servers/rendering/renderer_rd/shaders/screen_space_reflection.glsl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/servers/rendering/renderer_rd/shaders/screen_space_reflection.glsl b/servers/rendering/renderer_rd/shaders/screen_space_reflection.glsl index fde5688301..57349e55b1 100644 --- a/servers/rendering/renderer_rd/shaders/screen_space_reflection.glsl +++ b/servers/rendering/renderer_rd/shaders/screen_space_reflection.glsl @@ -190,8 +190,7 @@ void main() { } vec2 final_pos; - float grad; - grad = steps_taken / float(params.num_steps); + float grad = (steps_taken + 1.0) / float(params.num_steps); float initial_fade = params.curve_fade_in == 0.0 ? 1.0 : pow(clamp(grad, 0.0, 1.0), params.curve_fade_in); float fade = pow(clamp(1.0 - grad, 0.0, 1.0), params.distance_fade) * initial_fade; final_pos = pos; |