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:
Sergey Sharybin
2019-02-06 16:38:03 +01:00
parent 8c87af7440
commit 49e07dfdfb

View File

@@ -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 {