From 3562edcb7a549877bf810d019f34f72c16498203 Mon Sep 17 00:00:00 2001 From: AdenKoperczak Date: Mon, 9 Dec 2024 18:11:59 -0500 Subject: [PATCH] Change negative threshold values to act as inverted threshold --- scwx-qt/gl/threshold.geom | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scwx-qt/gl/threshold.geom b/scwx-qt/gl/threshold.geom index 677a80cd..deead87d 100644 --- a/scwx-qt/gl/threshold.geom +++ b/scwx-qt/gl/threshold.geom @@ -21,7 +21,9 @@ smooth out vec4 color; void main() { if (gsIn[0].displayed != 0 && - (gsIn[0].threshold <= 0 || // If Threshold: 0 was specified, no threshold + (gsIn[0].threshold == 0 || // If Threshold: 0 was specified, no threshold + uMapDistance == 0 || // If uMapDistance is zero, threshold is disabled + (gsIn[0].threshold < 0 && -(gsIn[0].threshold) <= uMapDistance) || // If Threshold is negative and below current map distance gsIn[0].threshold >= uMapDistance || // If Threshold is above current map distance gsIn[0].threshold >= 999) && // If Threshold: 999 was specified (or greater), no threshold (gsIn[0].timeRange[0] == 0 || // If there is no start time specified