Fix T63452: View Port/render artifacts while camera movement in

Patch provided by @matc
This commit is contained in:
Antonio Vazquez 2019-04-12 09:09:37 +02:00
parent d1cda823e0
commit 0ee23d0f5f
Notes: blender-bot 2023-02-14 03:04:04 +01:00
Referenced by issue #63525, Draw manager cache populate happens during Cycles viewport render
Referenced by issue #63452, Grease Pencil View Port/render artifacts while camera movement in
1 changed files with 3 additions and 0 deletions

View File

@ -84,6 +84,9 @@ void main(void)
if (sp2.x < -area.x || sp2.x > area.x) return;
if (sp2.y < -area.y || sp2.y > area.y) return;
/* culling behind camera */
if (P1.w < 0 || P2.w < 0) return;
/* determine the direction of each of the 3 segments (previous, current, next) */
vec2 v0 = normalize(sp1 - sp0);
vec2 v1 = normalize(sp2 - sp1);