summaryrefslogtreecommitdiff
path: root/data/shaders/path-fill-vert.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'data/shaders/path-fill-vert.glsl')
-rw-r--r--data/shaders/path-fill-vert.glsl3
1 files changed, 2 insertions, 1 deletions
diff --git a/data/shaders/path-fill-vert.glsl b/data/shaders/path-fill-vert.glsl
index 1752978..d66bb14 100644
--- a/data/shaders/path-fill-vert.glsl
+++ b/data/shaders/path-fill-vert.glsl
@@ -16,6 +16,7 @@ out vec2 fragPosition;
uniform mat4 mvp;
uniform vec4 color;
+uniform mat3 gradientMatrix;
void main(void) {
// Short-circuit because the fragments will just be discarded
@@ -23,7 +24,7 @@ void main(void) {
if (color.a <= 0.0) {
gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
} else {
- fragPosition = position;
+ fragPosition = (gradientMatrix * vec3(position, 1.0)).xy;
gl_Position = mvp * vec4(position, 0.0, 1.0);
}
}