diff --git a/components/operators/src/mask.cu b/components/operators/src/mask.cu
index ac6467a704e9697c63fd3528e61dd36cd3be35a2..aac736b1c4571e42cc67c374d1336e4c49242d5f 100644
--- a/components/operators/src/mask.cu
+++ b/components/operators/src/mask.cu
@@ -29,19 +29,19 @@ __global__ void discontinuity_kernel(ftl::cuda::TextureObject<int> mask_out, ftl
 
 			const uchar4 sup = support.tex2D((int)x, (int)y);
 			if (sup.x <= RADIUS) {
-				float dS = depth.tex2D((int)x - sup.x - 1, (int)y);
+				float dS = depth.tex2D((int)x - sup.x - RADIUS, (int)y);
 				if (fabs(dS - d) > threshold) mask.isDiscontinuity(true);
 			}
 			if (sup.y <= RADIUS) {
-				float dS = depth.tex2D((int)x + sup.y + 1, (int)y);
+				float dS = depth.tex2D((int)x + sup.y + RADIUS, (int)y);
 				if (fabs(dS - d) > threshold) mask.isDiscontinuity(true);
 			}
 			if (sup.z <= RADIUS) {
-				float dS = depth.tex2D((int)x, (int)y - sup.z - 1);
+				float dS = depth.tex2D((int)x, (int)y - sup.z - RADIUS);
 				if (fabs(dS - d) > threshold) mask.isDiscontinuity(true);
 			}
 			if (sup.w <= RADIUS) {
-				float dS = depth.tex2D((int)x, (int)y + sup.w + 1);
+				float dS = depth.tex2D((int)x, (int)y + sup.w + RADIUS);
 				if (fabs(dS - d) > threshold) mask.isDiscontinuity(true);
 			}
         }