 	}
 	
 	aten::hitrecord rec;
-	bool isHit = intersectBVH(&ctxt, path.ray, AT_MATH_EPSILON, AT_MATH_INF, &rec);
+	bool isHit = intersectBVH(&ctxt, rays[idx], AT_MATH_EPSILON, AT_MATH_INF, &rec);
 
 	path.isHit = isHit;
 	path.rec = rec;

	AT_NAME::CameraSampleResult camsample;
	AT_NAME::PinholeCamera::sample(&camsample, camera, s, t);

	path.ray = camsample.r;
	path.throughput = aten::make_float3(1);
	path.mtrlid = -1;
	path.pdfb = 0.0f;

			willContinue = false;
		}
		else {
			auto cosLight = dot(orienting_normal, -ray.dir);
			auto dist2 = (path.rec.p - ray.org).squared_length();

			if (cosLight >= 0) {
				auto pdfLight = 1 / path.rec.area;
