[Bf-blender-cvs] [77b00ef498c] lanpr-under-gp: LineArt: Fix long line not registering bug.

YimingWu noreply at git.blender.org
Wed Jul 29 09:09:35 CEST 2020


Commit: 77b00ef498cbcd0a8531c4ddd665c50e94fea931
Author: YimingWu
Date:   Wed Jul 29 15:09:05 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB77b00ef498cbcd0a8531c4ddd665c50e94fea931

LineArt: Fix long line not registering bug.

===================================================================

M	source/blender/editors/lineart/lineart_cpu.c

===================================================================

diff --git a/source/blender/editors/lineart/lineart_cpu.c b/source/blender/editors/lineart/lineart_cpu.c
index 6373c567104..ea51097f356 100644
--- a/source/blender/editors/lineart/lineart_cpu.c
+++ b/source/blender/editors/lineart/lineart_cpu.c
@@ -381,6 +381,7 @@ static void lineart_occlusion_single_line(LineartRenderBuffer *rb,
         }
       }
     }
+    printf("nba lrub %f %f %f %f\n", nba->l, nba->r, nba->u, nba->b);
 
     nba = lineart_bounding_area_next(nba, rl, x, y, k, positive_x, positive_y, &x, &y);
   }
@@ -3373,14 +3374,20 @@ static LineartBoundingArea *linear_bounding_areat_first_possible(LineartRenderBu
     return lineart_get_bounding_area(rb, data[0], data[1]);
   }
   else {
-    if ((lineart_LineIntersectTest2d(rl->l->fbcoord, rl->r->fbcoord, LU, RU, &sr) && sr < r &&
-         sr > 0) ||
-        (lineart_LineIntersectTest2d(rl->l->fbcoord, rl->r->fbcoord, LB, RB, &sr) && sr < r &&
-         sr > 0) ||
-        (lineart_LineIntersectTest2d(rl->l->fbcoord, rl->r->fbcoord, LB, LU, &sr) && sr < r &&
-         sr > 0) ||
-        (lineart_LineIntersectTest2d(rl->l->fbcoord, rl->r->fbcoord, RB, RU, &sr) && sr < r &&
-         sr > 0)) {
+    if (lineart_LineIntersectTest2d(rl->l->fbcoord, rl->r->fbcoord, LU, RU, &sr) && sr < r &&
+        sr > 0) {
+      r = sr;
+    }
+    if (lineart_LineIntersectTest2d(rl->l->fbcoord, rl->r->fbcoord, LB, RB, &sr) && sr < r &&
+        sr > 0) {
+      r = sr;
+    }
+    if (lineart_LineIntersectTest2d(rl->l->fbcoord, rl->r->fbcoord, LB, LU, &sr) && sr < r &&
+        sr > 0) {
+      r = sr;
+    }
+    if (lineart_LineIntersectTest2d(rl->l->fbcoord, rl->r->fbcoord, RB, RU, &sr) && sr < r &&
+        sr > 0) {
       r = sr;
     }
     interp_v2_v2v2_db(data, rl->l->fbcoord, rl->r->fbcoord, r);



More information about the Bf-blender-cvs mailing list