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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user