Added support for relative positioning of gradient fills. Addressed some PR feedback.

This commit is contained in:
shan 2022-10-07 11:41:50 -07:00
parent f9a6efcaa0
commit 12a87c54eb
8 changed files with 182 additions and 54 deletions

View file

@ -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);
}
}
}