[Bf-blender-cvs] [4ca8357bafb] lanpr-under-gp: LineArt: Compute contour before culling.

YimingWu noreply at git.blender.org
Wed Oct 21 06:57:19 CEST 2020


Commit: 4ca8357bafb7b59ddf35d7a26909131a50ea84b8
Author: YimingWu
Date:   Wed Oct 21 12:57:04 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB4ca8357bafb7b59ddf35d7a26909131a50ea84b8

LineArt: Compute contour before culling.

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

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 226a748e662..96d4ca87b9c 100644
--- a/source/blender/editors/lineart/lineart_cpu.c
+++ b/source/blender/editors/lineart/lineart_cpu.c
@@ -2509,16 +2509,16 @@ static void lineart_main_get_view_vector(LineartRenderBuffer *rb)
 
 static void lineart_main_compute_scene_contours(LineartRenderBuffer *rb)
 {
-  double *view_vector = rb->view_vector;
+  double view_vector[3];
   double dot_1 = 0, dot_2 = 0;
   double result;
   int add = 0, added = 0;
   int contour_count = 0;
   int crease_count = 0;
   int material_count = 0;
-
-  if (!rb->cam_is_persp) {
-    lineart_main_get_view_vector(rb);
+  
+  if(!rb->cam_is_persp){
+      copy_v3_v3_db(view_vector, rb->view_vector);
   }
 
   LISTBASE_FOREACH (LineartRenderElementLinkNode *, reln, &rb->line_buffer_pointers) {
@@ -3895,20 +3895,19 @@ int ED_lineart_compute_feature_lines_internal(Depsgraph *depsgraph, const int sh
 
   LRT_CANCEL_STAGE
 
+  lineart_main_bounding_area_make_initial(rb);
+  if (!intersections_only) {
+    lineart_main_compute_scene_contours(rb);
+  }
+
   lineart_main_cull_triangles(rb, false);
   lineart_main_cull_triangles(rb, true);
 
   lineart_main_perspective_division(rb);
 
-  lineart_main_bounding_area_make_initial(rb);
-
   LRT_CANCEL_STAGE
   LRT_PROGRESS(10, "LRT: Contour lines.");
 
-  if (!intersections_only) {
-    lineart_main_compute_scene_contours(rb);
-  }
-
   LRT_CANCEL_STAGE
   LRT_PROGRESS(25, "LRT: Intersections.");



More information about the Bf-blender-cvs mailing list