From 6d6fec46b2103b1b79741e9dfa6926989cd55d79 Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Mon, 26 Jun 2017 08:18:12 +0100 Subject: [PATCH] In geometry41core, take the line width/depth from the second vertex rather than the first. This change fixes a problem where a sequence of lines that have different widths are displayed with the widths shifted by 1, i.e. line 1 had the width of line 2 and so on. --- plugins/LayerView/layers3d.shader | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/LayerView/layers3d.shader b/plugins/LayerView/layers3d.shader index 6f5e986eec..e8fe425c70 100755 --- a/plugins/LayerView/layers3d.shader +++ b/plugins/LayerView/layers3d.shader @@ -130,9 +130,9 @@ geometry41core = // fixed size for movements size_x = 0.05; } else { - size_x = v_line_dim[0].x / 2 + 0.01; // radius, and make it nicely overlapping + size_x = v_line_dim[1].x / 2 + 0.01; // radius, and make it nicely overlapping } - size_y = v_line_dim[0].y / 2 + 0.01; + size_y = v_line_dim[1].y / 2 + 0.01; g_vertex_delta = gl_in[1].gl_Position - gl_in[0].gl_Position; g_vertex_normal_horz_head = normalize(vec3(-g_vertex_delta.x, -g_vertex_delta.y, -g_vertex_delta.z));