 	return (isect->objid >= 0);
 }
 
+#define ENABLE_PLANE_LOOP_SBVH
+
 template <idaten::IntersectType Type>
 AT_CUDA_INLINE __device__ bool intersectSBVH(
 	const Context* ctxt,


		bool isHit = false;

		if (attrib.x >= 0) {
			// Leaf.
			const auto* s = &ctxt->shapes[(int)attrib.x];

			if (attrib.z >= 0) {	// exid
				//if (aten::aabb::hit(r, boxmin, boxmax, t_min, t_max, &t)) {
				if (hitAABB(r.org, r.dir, boxmin, boxmax, t_min, t_max, &t)) {
					if (s->mtxid >= 0) {
						auto mtxW2L = ctxt->matrices[s->mtxid * 2 + 1];

		else {
			nodeid = (int)node1.w;
		}
#endif
	}

	return (isect->objid >= 0);
