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