From 8084cd4ae2491d0140e991450ca7f645604db76c Mon Sep 17 00:00:00 2001 From: Alireza Date: Thu, 11 Apr 2024 14:27:58 -0400 Subject: [PATCH] fix(ImageOutline): allow zero outline by hiding it --- Sources/Rendering/OpenGL/ImageMapper/index.js | 5 ----- Sources/Rendering/OpenGL/glsl/vtkVolumeFS.glsl | 3 --- 2 files changed, 8 deletions(-) diff --git a/Sources/Rendering/OpenGL/ImageMapper/index.js b/Sources/Rendering/OpenGL/ImageMapper/index.js index fcbd0495df5..e734587aff8 100644 --- a/Sources/Rendering/OpenGL/ImageMapper/index.js +++ b/Sources/Rendering/OpenGL/ImageMapper/index.js @@ -351,11 +351,6 @@ function vtkOpenGLImageMapper(publicAPI, model) { return; } - if (actualThickness == 0) { - gl_FragData[0] = vec4(0.0, 0.0, 1.0, 1.0); - return; - } - for (int i = -actualThickness; i <= actualThickness; i++) { for (int j = -actualThickness; j <= actualThickness; j++) { if (i == 0 || j == 0) { diff --git a/Sources/Rendering/OpenGL/glsl/vtkVolumeFS.glsl b/Sources/Rendering/OpenGL/glsl/vtkVolumeFS.glsl index aa87b6dd715..0abf9af742b 100644 --- a/Sources/Rendering/OpenGL/glsl/vtkVolumeFS.glsl +++ b/Sources/Rendering/OpenGL/glsl/vtkVolumeFS.glsl @@ -1039,9 +1039,6 @@ vec4 getColorForValue(vec4 tValue, vec3 posIS, vec3 tstep) int actualThickness = int(textureValue * 255.0); - if (actualThickness == 0) { - return vec4(0, 0, 1, 1); - } // If it is the background (segment index 0), we should quickly bail out. // Previously, this was determined by tColor.a, which was incorrect as it