[Bf-blender-cvs] [34d7559ffee] lanpr-under-gp: LineArt: Discard outside lines
YimingWu
noreply at git.blender.org
Fri Oct 23 03:17:57 CEST 2020
Commit: 34d7559ffee4e3a3c5984bb6bb5cb655acb7a2de
Author: YimingWu
Date: Fri Oct 23 09:17:48 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB34d7559ffee4e3a3c5984bb6bb5cb655acb7a2de
LineArt: Discard outside lines
===================================================================
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 7f4c44497fa..028c9e46e82 100644
--- a/source/blender/editors/lineart/lineart_cpu.c
+++ b/source/blender/editors/lineart/lineart_cpu.c
@@ -754,6 +754,17 @@ static void lineart_triangle_cull_single(LineartRenderBuffer *rb,
old_rl->tr = ((old_rl->tr == rt) ? (newrt) : (old_rl->tr)); \
}
+#define REMOVE_TRIANGLE_RL \
+ if (rta->rl[0]) { \
+ rta->rl[0]->flags = LRT_EDGE_FLAG_CHAIN_PICKED; \
+ } \
+ if (rta->rl[1]) { \
+ rta->rl[1]->flags = LRT_EDGE_FLAG_CHAIN_PICKED; \
+ } \
+ if (rta->rl[2]) { \
+ rta->rl[2]->flags = LRT_EDGE_FLAG_CHAIN_PICKED; \
+ }
+
switch (in0 + in1 + in2) {
case 0: /* ignore this triangle. */
return;
@@ -762,7 +773,7 @@ static void lineart_triangle_cull_single(LineartRenderBuffer *rb,
* also remove render lines form being computed.
*/
lineart_triangle_set_cull_flag(rt, LRT_CULL_DISCARD);
-
+ REMOVE_TRIANGLE_RL
return;
case 2:
/** Two points behind near plane, cut those and
More information about the Bf-blender-cvs
mailing list