 
 	idx = hitindices[idx];
 
+	//idx = (480 - 360) * 640 + 345;
+	//idx = getIdx(43, 5, 640);
+
 	auto& path = paths[idx];
 	const auto& ray = rays[idx];
 

	data = make_float4(path.contrib.x, path.contrib.y, path.contrib.z, 0) / sample;
#endif

	surf2Dwrite(
		data,
		outSurface,

		dim3 threadPerBlock(64);

		shade << <blockPerGrid, threadPerBlock >> > (
		//shade << <1, 1 >> > (
			outputSurf,
			paths.ptr(),
			m_hitidx.ptr(), hitcount,
