d4ceade5ea
the code snippet is supposed to compute the maximal `isect.t` in the array, which is used to determine if subsequent intersections should be added. However, the previous implementation includes the old `isect.t` which is going to be replaced, resulting an overestimation of `tmax_hits` and thus missing closer intersections. For BVH2, the issue is fixed by computing the `max_t` after a new entry is inserted. For Embree, the issue is fixed by finding the `second_largest_t` as well, and compare that with the new insertion to find the new `max_t`. Pull Request: https://projects.blender.org/blender/blender/pulls/125739