 				else {
 					tmpexid = -1;
 
+					bool isHit = false;
+
 					const auto* s = &ctxt->shapes[(int)attrib.x];
 
 					if (attrib.w >= 0) {	// exid
 						isectTmp.t = AT_MATH_INF;
-						intersectAABB(&bvhray, aabb, isectTmp.t);
+						isHit = intersectAABB(&bvhray, aabb, isectTmp.t);
 						tmpexid = attrib.w;
 					}
 #if 0

						isectTmp.mtrlid = s->mtrl.idx;
					}

					if (isectTmp.t < hitt) {
						hitt = isectTmp.t;
						*exid = tmpexid;
						*shapeid = tmpshapeid;

						if (tmpshapeid >= 0 && type == IntersectType::Closer) {
							return false;
						}
					}
					if (tmpexid < 0) {

	aten::Intersection* isect,
	const float t_max)
{
	float t_min = AT_MATH_EPSILON;

	BVHCandidate candidates[STACK_SIZE];
	int candidateNum = 0;

	bool isHit = intersectBVH(
		ctxt->nodes[0],
		candidates, candidateNum,
		ctxt,
		r,
		t_min, t_max,
		isect,
		IntersectType::Closer);

	for(int i = 0; i < candidateNum; i++) {
		const auto& c = candidates[i];

		aten::Intersection isectTmp;

		const auto& param = ctxt->shapes[c.shapeid];

		auto mtxW2L = ctxt->matrices[param.mtxid * 2 + 1];

