[Bf-blender-cvs] [5eeaf4cce69] master: LineArt: Use consitent view vector direction.

YimingWu noreply at git.blender.org
Wed Dec 1 08:54:14 CET 2021


Commit: 5eeaf4cce69f10584d2d84671b2d44e86219c514
Author: YimingWu
Date:   Wed Dec 1 15:51:23 2021 +0800
Branches: master
https://developer.blender.org/rB5eeaf4cce69f10584d2d84671b2d44e86219c514

LineArt: Use consitent view vector direction.

Now do not invertes view vector in different stages of calculation.

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

M	source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c

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

diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index 6da05a3934c..f2e6130b947 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -502,10 +502,6 @@ static void lineart_main_occlusion_begin(LineartRenderBuffer *rb)
   rb->edge_mark.last = rb->edge_mark.first;
   rb->floating.last = rb->floating.first;
 
-  /* This is needed because the occlusion function expects the camera vector to point towards the
-   * camera. */
-  negate_v3_db(rb->view_vector);
-
   TaskPool *tp = BLI_task_pool_create(NULL, TASK_PRIORITY_HIGH);
 
   for (i = 0; i < thread_count; i++) {
@@ -3006,7 +3002,7 @@ static void lineart_triangle_intersect_in_bounding_area(LineartRenderBuffer *rb,
  */
 static void lineart_main_get_view_vector(LineartRenderBuffer *rb)
 {
-  float direction[3] = {0, 0, -1};
+  float direction[3] = {0, 0, 1};
   float trans[3];
   float inv[4][4];
   float obmat_no_scale[4][4];



More information about the Bf-blender-cvs mailing list