LineArt: Use consitent view vector direction.

Now do not invertes view vector in different stages of calculation.
This commit is contained in:
YimingWu 2021-12-01 15:51:23 +08:00
parent 386b112f76
commit 5eeaf4cce6
1 changed files with 1 additions and 5 deletions

View File

@ -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];