diff options
Diffstat (limited to 'src/vector/shaders/paint.vert')
| -rw-r--r-- | src/vector/shaders/paint.vert | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/vector/shaders/paint.vert b/src/vector/shaders/paint.vert new file mode 100644 index 0000000..89c2c82 --- /dev/null +++ b/src/vector/shaders/paint.vert @@ -0,0 +1,15 @@ +#version 450 +#extension GL_GOOGLE_include_directive : require +// Painted triangles: device pixels (y down) to normalized device +// coordinates (y up), as in path.vert, with the fill's paint passed on. +#include "Painted.glsl" +#include "Viewport.glsl" + +layout(location = 0) flat out vec4 fill_color; +layout(location = 1) flat out int fill_gradient; + +void main() { + gl_Position = vec4(position.x / viewport.size.x * 2.0 - 1.0, 1.0 - position.y / viewport.size.y * 2.0, 0.0, 1.0); + fill_color = color; + fill_gradient = int(gradient); +} |
