Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYimingWu <xp8110@outlook.com>2022-08-12 10:38:26 +0300
committerYimingWu <xp8110@outlook.com>2022-08-12 10:40:58 +0300
commit498e26fa0f6486fa2d3bb0029b11eb1dc48a32be (patch)
treebcc8202624bfafc1283df86a41c308a3b7befdba /source/blender/gpencil_modifiers
parent95cc5c6081d1f208028484e02d18881b7ccc6886 (diff)
Fix T100138: Use `double` for LineArt intersection record.
The use of `float` for intermediate intersection record led to some inaccuracy which caused flickering in intersection lines. Now fixed.
Diffstat (limited to 'source/blender/gpencil_modifiers')
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index 011c79025c4..9970e4d5ac1 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -50,7 +50,7 @@
#include "lineart_intern.h"
typedef struct LineartIsecSingle {
- float v1[3], v2[3];
+ double v1[3], v2[3];
LineartTriangle *tri1, *tri2;
} LineartIsecSingle;
@@ -3285,8 +3285,8 @@ static void lineart_add_isec_thread(LineartIsecThread *th,
th->array = new_array;
}
LineartIsecSingle *isec_single = &th->array[th->current];
- copy_v3fl_v3db(isec_single->v1, v1);
- copy_v3fl_v3db(isec_single->v2, v2);
+ copy_v3_v3_db(isec_single->v1, v1);
+ copy_v3_v3_db(isec_single->v2, v2);
isec_single->tri1 = tri1;
isec_single->tri2 = tri2;
if (tri1->target_reference > tri2->target_reference) {
@@ -4582,8 +4582,8 @@ static void lineart_create_edges_from_isec_data(LineartIsecData *d)
LineartIsecSingle *is = &th->array[j];
LineartVert *v1 = v;
LineartVert *v2 = v + 1;
- copy_v3db_v3fl(v1->gloc, is->v1);
- copy_v3db_v3fl(v2->gloc, is->v2);
+ copy_v3_v3_db(v1->gloc, is->v1);
+ copy_v3_v3_db(v2->gloc, is->v2);
/* The intersection line has been generated only in geometry space, so we need to transform
* them as well. */
mul_v4_m4v3_db(v1->fbcoord, ld->conf.view_projection, v1->gloc);