blob: 89c2c82de57be3a3a4f072fac71a050f945c0c66 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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);
}
|