From 15c0ddc327cdbbaf6e029f3d467e41e4a6bdf88d Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Thu, 14 Mar 2024 00:05:47 -0500 Subject: [PATCH] bool is a non-standard glsl type not recognized by all OpenGL drivers --- scwx-qt/gl/geo_texture2d.vert | 4 ++-- scwx-qt/gl/map_color.vert | 4 ++-- scwx-qt/gl/texture2d_array.vert | 4 ++-- scwx-qt/gl/threshold.geom | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scwx-qt/gl/geo_texture2d.vert b/scwx-qt/gl/geo_texture2d.vert index a3adeed6..6ac512c7 100644 --- a/scwx-qt/gl/geo_texture2d.vert +++ b/scwx-qt/gl/geo_texture2d.vert @@ -25,7 +25,7 @@ out VertexData vec3 texCoord; vec4 color; ivec2 timeRange; - bool displayed; + int displayed; } vsOut; smooth out vec3 texCoord; @@ -43,7 +43,7 @@ vec2 latLngToScreenCoordinate(in vec2 latLng) void main() { // Always set displayed to true - vsOut.displayed = true; + vsOut.displayed = 1; // Pass the threshold and time range to the geometry shader vsOut.threshold = aThreshold; diff --git a/scwx-qt/gl/map_color.vert b/scwx-qt/gl/map_color.vert index d9c207b4..6ae98e92 100644 --- a/scwx-qt/gl/map_color.vert +++ b/scwx-qt/gl/map_color.vert @@ -16,7 +16,7 @@ out VertexData vec3 texCoord; vec4 color; ivec2 timeRange; - bool displayed; + int displayed; } vsOut; smooth out vec4 color; @@ -24,7 +24,7 @@ smooth out vec4 color; void main() { // Always set displayed to true - vsOut.displayed = true; + vsOut.displayed = 1; // Pass the threshold and time range to the geometry shader vsOut.threshold = aThreshold; diff --git a/scwx-qt/gl/texture2d_array.vert b/scwx-qt/gl/texture2d_array.vert index e42f31d4..18cfb357 100644 --- a/scwx-qt/gl/texture2d_array.vert +++ b/scwx-qt/gl/texture2d_array.vert @@ -17,7 +17,7 @@ out VertexData vec3 texCoord; vec4 color; ivec2 timeRange; - bool displayed; + int displayed; } vsOut; smooth out vec3 texCoord; @@ -30,7 +30,7 @@ void main() vsOut.timeRange = ivec2(0, 0); // Pass displayed to the geometry shader - vsOut.displayed = (aDisplayed != 0); + vsOut.displayed = aDisplayed; // Pass the texture coordinate and color modulate to the geometry and // fragment shaders diff --git a/scwx-qt/gl/threshold.geom b/scwx-qt/gl/threshold.geom index 53bde434..677a80cd 100644 --- a/scwx-qt/gl/threshold.geom +++ b/scwx-qt/gl/threshold.geom @@ -12,7 +12,7 @@ in VertexData vec3 texCoord; vec4 color; ivec2 timeRange; - bool displayed; + int displayed; } gsIn[]; smooth out vec3 texCoord; @@ -20,7 +20,7 @@ smooth out vec4 color; void main() { - if (gsIn[0].displayed && + if (gsIn[0].displayed != 0 && (gsIn[0].threshold <= 0 || // If Threshold: 0 was specified, no threshold gsIn[0].threshold >= uMapDistance || // If Threshold is above current map distance gsIn[0].threshold >= 999) && // If Threshold: 999 was specified (or greater), no threshold