 
 		auto& curaov = getCurAovs();
 
+		static const int ShdowRayNum = 2;
+
 		if (bounce == 0) {
-			shade<true> << <blockPerGrid, threadPerBlock >> > (
+			shade<true, ShdowRayNum> << <blockPerGrid, threadPerBlock >> > (
 				curaov.ptr(), mtxW2C,
 				width, height,
 				m_paths.ptr(),

				m_random.ptr());
		}
		else {
			shade<false> << <blockPerGrid, threadPerBlock >> > (
				curaov.ptr(), mtxW2C,
				width, height,
				m_paths.ptr(),

	}
}

template <bool isFirstBounce, int ShadowRayNum>
__global__ void shade(
	idaten::SVGFPathTracing::AOV* aovs,
	aten::mat4 mtxW2C,
