 __global__ void gather(
 	cudaSurfaceObject_t outSurface,
 	Path* paths,
-	int width, int height,
-	int sample)
+	int width, int height)
 {
 	const auto ix = blockIdx.x * blockDim.x + threadIdx.x;
 	const auto iy = blockIdx.y * blockDim.y + threadIdx.y;

		//gather << <1, 1 >> > (
			outputSurf,
			paths.ptr(),
			width, height,
			maxSamples);

		{
			vtxparamsPos.unbind();

		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);
		}
