 #define IS_IN_BOUND(x, a, b)	((a) <= (x) && (x) < (b))
 
 __global__ void varianceEstimation(
+	idaten::SVGFPathTracing::TileDomain tileDomain,
 	cudaSurfaceObject_t dst,
 	const float4* __restrict__ aovNormalDepth,
 	const float4* __restrict__ aovTexclrTemporalWeight,

	{
		dim3 block(BLOCK_SIZE, BLOCK_SIZE);
		dim3 grid(
			(width + block.x - 1) / block.x,
			(height + block.y - 1) / block.y);

		int curaov = getCurAovs();

		varianceEstimation << <grid, block >> > (
		//varianceEstimation << <1, 1 >> > (
			outputSurf,
			m_aovNormalDepth[curaov].ptr(),
			m_aovTexclrTemporalWeight[curaov].ptr(),

	int ix = blockIdx.x * blockDim.x + threadIdx.x;
	int iy = blockIdx.y * blockDim.y + threadIdx.y;

	if (ix >= tileDomain.w || iy >= tileDomain.h) {
		return;
	}

	ix += tileDomain.x;
	iy += tileDomain.y;

	const int idx = getIdx(ix, iy, width);

