 							? 1.0
 							: pow(max(0.0, 1.0 - 2.0 * err / sqrt(dist2)), 2.0);
 					}
+#else
+					float3 sampleViewPos = computeViewSpace(ix + u, iy + v, sampleDepth, width, height, &mtxC2V);
+
+					float Wn = C(centerNormal, sampleNml, 0.1f);
+					float Ws = C(centerViewPos, sampleViewPos, 0.1f);
+					float Wd = C(centerDepth, sampleDepth, 0.1f);
 #endif
 
 					float Wm = centerMeshId == sampleMeshId ? 1.0f : 0.0f;

	return make_float3(pos.x, pos.y, pos.z);
}

#define IS_IN_BOUND(x, a, b)	((a) <= (x) && (x) < (b))

__global__ void varianceEstimation(

			cudaBoundaryModeTrap);
	}

	float3 centerViewPos = computeViewSpace(ix, iy, centerDepth, width, height, &mtxC2V);

	float3 centerMoment = make_float3(momentMeshid.x, momentMeshid.y, momentMeshid.z);

