Fix T76080 Workbench: Background Glitches caused by Screen Cavity effect

This commit is contained in:
Clément Foucault 2020-05-19 21:37:33 +02:00
parent d6cc16831a
commit a5a069c272
Notes: blender-bot 2023-02-14 11:34:30 +01:00
Referenced by issue #76080, Glitches Workbench and Screen Cavity
1 changed files with 4 additions and 0 deletions

View File

@ -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;