From 2bd020521578549eb47c58c7984c9a35b7c35cd8 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 27 Sep 2021 15:10:28 +0200 Subject: Geometry Nodes: make field links thinner than other links This makes it easier to spot which links contain fields and which contain data. Actually, the patch makes all other links a bit thicker. However, with soon-to-be-implemented theme changes, the perceived thickness will be the same as before. This is part of T91563. Differential Revision: https://developer.blender.org/D12646 --- source/blender/gpu/shaders/gpu_shader_2D_nodelink_vert.glsl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/gpu') diff --git a/source/blender/gpu/shaders/gpu_shader_2D_nodelink_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_nodelink_vert.glsl index aae7f641af8..2194d23a4ea 100644 --- a/source/blender/gpu/shaders/gpu_shader_2D_nodelink_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_2D_nodelink_vert.glsl @@ -19,6 +19,7 @@ in vec2 P3; in ivec4 colid_doarrow; in ivec2 domuted; in float dim_factor; +in float thickness; uniform vec4 colors[6]; @@ -41,6 +42,7 @@ uniform vec4 colors[3]; uniform bool doArrow; uniform bool doMuted; uniform float dim_factor; +uniform float thickness; # define colShadow colors[0] # define colStart colors[1] @@ -103,7 +105,7 @@ void main(void) finalColor[3] *= dim_factor; /* Expand into a line */ - gl_Position.xy += exp_axis * expandSize * expand_dist; + gl_Position.xy += exp_axis * expandSize * expand_dist * thickness; /* If the link is not muted or is not a reroute arrow the points are squashed to the center of * the line. Magic numbers are defined in drawnode.c */ -- cgit v1.2.3