 				*isect = isectTmp;
 				isect->objid = (int)attrib.x;
 				isect->primid = (int)attrib.y;
-
-				if (type == IntersectType::Closer) {
-					return true;
-				}
 			}
 		}
 		else {

	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;


					transformedRay = r;
				}

				isHit = intersectBVHClosestTriangles(ctxt->nodes[(int)attrib.z], ctxt, transformedRay, t_min, t_max, &isectTmp);
			}
			else {
				// TODO
