 	aten::hitrecord recTmp;
 	aten::hitrecordOption recOptTmp;
 
-	bool isHit = false;
-
 	int nodeid = -1;
 	float4 node;	// x:left, y:right
 	float4 attrib;	// x:shapeid, y:primid, z:nestid

						// TODO
						// Only sphere...
						//isHit = intersectShape(s, nullptr, ctxt, r, t_min, t_max, &recTmp, &recOptTmp);
						isHit = hitSphere(s, nullptr, ctxt, r, t_min, t_max, &recTmp, &recOptTmp);
						recTmp.mtrlid = s->mtrl.idx;
					}

					if (isHit) {
						if (recTmp.t < hitt) {
							hitt = recTmp.t;
							*exid = tmpexid;
							*shapeid = tmpshapeid;
						}
						if (tmpexid < 0) {
							if (recTmp.t < rec->t) {
								*rec = recTmp;
								*recOpt = recOptTmp;
								rec->obj = (void*)s;
							}
						}
					}
				}

					}
				}
				else {
					tmpexid = -1;

					const auto* s = &ctxt->shapes[(int)attrib.x];

					if (attrib.w >= 0) {	// exid
						recTmp.t = AT_MATH_INF;
						intersectAABB(&bvhray, aabb, recTmp.t);
						tmpexid = attrib.w;
					}
#if 0
