I think to make it clearer, instead of hitInfo.distance, it's better to write as: for active ray i, closest point on node.box is farther than packetHitInfo[i].distance
I think to make it clearer, instead of hitInfo.distance, it's better to write as: for active ray i, closest point on node.box is farther than packetHitInfo[i].distance