From 9b5d364add330fc18100491bf3c57316a27183f5 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 27 Aug 2021 16:07:38 -0400 Subject: graphics: path: Separate fill/stroke into different shaders. --- data/shaders/path-vert.glsl | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 data/shaders/path-vert.glsl (limited to 'data/shaders/path-vert.glsl') diff --git a/data/shaders/path-vert.glsl b/data/shaders/path-vert.glsl deleted file mode 100644 index 38fa5d2..0000000 --- a/data/shaders/path-vert.glsl +++ /dev/null @@ -1,44 +0,0 @@ -// -*- mode: c -*- - -#ifdef GLSL330 -layout (location = 0) in vec2 position; -layout (location = 1) in vec2 tex; -layout (location = 2) in float strokeLength; -#elif defined(GLSL130) -in vec2 position; -in vec2 tex; -in float strokeLength; -#elif defined(GLSL120) -attribute vec2 position; -attribute vec2 tex; -attribute float strokeLength; -#endif - -#ifdef GLSL120 -varying vec2 fragTex; -varying float fragStrokeLength; -#else -out vec2 fragTex; -out float fragStrokeLength; -#endif - -uniform mat4 mvp; -uniform vec4 color; -uniform int mode; -uniform int strokeClosed; - -void main(void) { - // Short-circuit because the fragments will just be discarded anyway. - if (color.a <= 0.0) { - gl_Position = vec4(0.0, 0.0, 0.0, 1.0); - return; - } - - // Stroke specific setup. - if (mode == 1) { - fragStrokeLength = strokeLength; - } - - fragTex = tex; - gl_Position = mvp * vec4(position.xy, 0.0, 1.0); -} -- cgit v1.2.3