 	float t_min = AT_MATH_EPSILON;
 	float t_max = AT_MATH_INF;
 
-	bool isHit = intersectBVH(
+	bool isHit = intersectBVHClosest(
 		ctxt->nodes[0],
 		ctxt,
 		r,

	return true;
}

AT_CUDA_INLINE __device__ bool intersectBVHTriangles(
	cudaTextureObject_t nodes,
	const Context* ctxt,
	const aten::ray r,
	float t_min, float t_max,
	aten::Intersection* isect,
	IntersectType type = IntersectType::Closest)
{
	aten::Intersection isectTmp;


			if (isectTmp.t < isect->t) {
				*isect = isectTmp;
				isect->objid = (int)attrib.x;
			}
		}
		else {
