Added support for relative positioning of gradient fills. Addressed some PR feedback.
This commit is contained in:
parent
f9a6efcaa0
commit
12a87c54eb
8 changed files with 182 additions and 54 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue