LineArt: Correct clamping of out of bound isect index
Handles rare cases where line doesn't intersect the triangle correctly.
This commit is contained in:
parent
d09b1d2759
commit
97ae08c9fc
Notes:
blender-bot
2023-04-04 07:45:26 +02:00
Referenced by issue #93479, 3.0 Potential candidates for corrective releases
|
@ -2585,8 +2585,12 @@ static bool lineart_triangle_edge_image_space_occlusion(SpinLock *UNUSED(spl),
|
|||
INTERSECT_JUST_GREATER(is, order, is[LCross], RCross);
|
||||
}
|
||||
else {
|
||||
INTERSECT_JUST_GREATER(is, order, is[LCross], LCross);
|
||||
INTERSECT_JUST_GREATER(is, order, is[LCross], RCross);
|
||||
if (LCross >= 0) {
|
||||
INTERSECT_JUST_GREATER(is, order, is[LCross], LCross);
|
||||
if (LCross >= 0) {
|
||||
INTERSECT_JUST_GREATER(is, order, is[LCross], RCross);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue