From 230a7447f5892338bcefee97a66e6e924d510231 Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Thu, 3 Oct 2019 18:51:37 +0300
Subject: [PATCH] Ignore masked points

---
 components/renderers/cpp/src/splatter.cu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/renderers/cpp/src/splatter.cu b/components/renderers/cpp/src/splatter.cu
index 9daf607bc..16ff3e7d4 100644
--- a/components/renderers/cpp/src/splatter.cu
+++ b/components/renderers/cpp/src/splatter.cu
@@ -257,7 +257,7 @@ __global__ void dibr_attribute_contrib_kernel(
 	const int y = blockIdx.y*blockDim.y + threadIdx.y;
 
 	const float4 worldPos = points.tex2D(x, y);
-	if (worldPos.x == MINF) return;
+	if (worldPos.x == MINF || (!(params.m_flags & ftl::render::kShowDisconMask) && worldPos.w < 0.0f)) return;
 
 	const float3 camPos = params.m_viewMatrix * make_float3(worldPos);
 	if (camPos.z < params.camera.minDepth) return;
-- 
GitLab