diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-05-19 22:37:33 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-05-19 22:37:43 +0300 |
commit | a5a069c272a8a2a4c2acb9a7bbab484b0b23c624 (patch) | |
tree | 58e3e17dd797fb41c1b20d4f6b99f42b63cb0859 /source | |
parent | d6cc16831ac0c9723fccca3dc98cbf02113f648c (diff) |
Fix T76080 Workbench: Background Glitches caused by Screen Cavity effect
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/workbench/shaders/workbench_curvature_lib.glsl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/draw/engines/workbench/shaders/workbench_curvature_lib.glsl b/source/blender/draw/engines/workbench/shaders/workbench_curvature_lib.glsl index e6bc4c7bbc6..a4d81393dbc 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_curvature_lib.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_curvature_lib.glsl @@ -26,6 +26,10 @@ void curvature_compute(vec2 uv, if ((object_up != object_down) || (object_right != object_left)) { return; } + /* Avoid shading background pixels. */ + if ((object_up == object_right) && (object_right == 0u)) { + return; + } float normal_up = workbench_normal_decode(texture(normalBuffer, uv + offset.zy)).g; float normal_down = workbench_normal_decode(texture(normalBuffer, uv - offset.zy)).g; |