 		//gather << <1, 1 >> > (
 			outputSurf,
 			paths.ptr(),
-			width, height,
-			maxSamples);
+			width, height);
 
 		{
 			vtxparamsPos.unbind();


	path.throughput = aten::vec3(1);
	path.pdfb = 0.0f;
	path.isHit = false;
	path.isTerminate = false;
	path.isSingular = false;

	// Accumulate value, so do not reset.
	//path.contrib = aten::vec3(0);

		auto emit = aten::vec3(bg.x, bg.y, bg.z);

		float misW = 1.0f;
		if (isFirstBounce) {
			path.isKill = true;
		}
		else {
			auto pdfLight = AT_NAME::ImageBasedLight::samplePdf(emit, envmapAvgIllum);
			misW = path.pdfb / (pdfLight + path.pdfb);
		}
