[Bf-blender-cvs] [24b84e46880] blender-v3.0-release: LineArt: Use consitent view vector direction.

YimingWu noreply at git.blender.org
Wed Dec 1 08:56:11 CET 2021


Commit: 24b84e468805fb15baa465fbf2a34592b6db16ca
Author: YimingWu
Date:   Wed Dec 1 15:51:23 2021 +0800
Branches: blender-v3.0-release
https://developer.blender.org/rB24b84e468805fb15baa465fbf2a34592b6db16ca

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 88d717eb032..3df2bec67ff 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++) {
@@ -3010,7 +3006,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