summaryrefslogtreecommitdiffstats
path: root/glow/src
diff options
context:
space:
mode:
Diffstat (limited to 'glow/src')
-rw-r--r--glow/src/shader/common/gradient.frag3
1 files changed, 3 insertions, 0 deletions
diff --git a/glow/src/shader/common/gradient.frag b/glow/src/shader/common/gradient.frag
index ade9c4a1..3c701af7 100644
--- a/glow/src/shader/common/gradient.frag
+++ b/glow/src/shader/common/gradient.frag
@@ -45,6 +45,9 @@ void main() {
fragColor = color_stops[0];
} else if (coord_offset > color_stops[color_stops_size - 1].x) {
fragColor = color_stops[color_stops_size - 2];
+ } else {
+ //This use case can happen if a gradient's start & end position are the same
+ fragColor = vec4(0.0, 0.0, 0.0, 0.0);
}
}
}