summaryrefslogtreecommitdiff
path: root/src/mbgl/shader/line.vertex.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/shader/line.vertex.glsl')
-rw-r--r--src/mbgl/shader/line.vertex.glsl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/shader/line.vertex.glsl b/src/mbgl/shader/line.vertex.glsl
index 3b3caaab15..980212384b 100644
--- a/src/mbgl/shader/line.vertex.glsl
+++ b/src/mbgl/shader/line.vertex.glsl
@@ -34,13 +34,13 @@ void main() {
// Scale the extrusion vector down to a normal and then up by the line width
// of this vertex.
- vec4 dist = vec4(u_linewidth.s * a_extrude * scale, 0.0, 0.0);
+ vec2 dist = u_linewidth.s * a_extrude * scale;
// Remove the texture normal bit of the position before scaling it with the
// model/view matrix. Add the extrusion vector *after* the model/view matrix
// because we're extruding the line in pixel space, regardless of the current
// tile's zoom level.
- gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + dist.xy / u_ratio, 0.0, 1.0);
+ gl_Position = u_matrix * vec4(floor(a_pos * 0.5) + dist / u_ratio, 0.0, 1.0);
// position of y on the screen
float y = gl_Position.y / gl_Position.w;