Fix T61190: Crash in particles distribution
Was visible with certain configuration only, is a numeric instability caused by degenerate ray direction. Not sure the distribution is correct, just fixing crash which was caused by usage of watertight intersection.
This commit is contained in:
@@ -1813,7 +1813,7 @@ bool isect_ray_tri_watertight_v3(
|
||||
|
||||
/* Calculate determinant. */
|
||||
det = u + v + w;
|
||||
if (UNLIKELY(det == 0.0f)) {
|
||||
if (UNLIKELY(det == 0.0f || !isfinite(det))) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user