Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-07-15 12:00:23 +0300
committerJacques Lucke <jacques@blender.org>2021-07-15 12:00:23 +0300
commitc27ef1e9e8e663e02173e518c1e669e9845b3d1f (patch)
treed4d073bb163c50bfc66b2d5dc5e14c3709f5955b /source/blender/gpu
parentd5e626b24309b85eb2123bf76d4b8dfc2c728472 (diff)
Geometry Nodes: dim links whose start and end sockets are not visible
This makes node trees with long links that cross other nodes easier to work with. Dimmed links will be ignored by various modal operators like cut and reroute insertion. Differential Revision: https://developer.blender.org/D11813
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_nodelink_vert.glsl4
1 files changed, 4 insertions, 0 deletions
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 9ce2a1be015..aae7f641af8 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_nodelink_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_nodelink_vert.glsl
@@ -18,6 +18,7 @@ in vec2 P2;
in vec2 P3;
in ivec4 colid_doarrow;
in ivec2 domuted;
+in float dim_factor;
uniform vec4 colors[6];
@@ -39,6 +40,7 @@ uniform vec2 bezierPts[4];
uniform vec4 colors[3];
uniform bool doArrow;
uniform bool doMuted;
+uniform float dim_factor;
# define colShadow colors[0]
# define colStart colors[1]
@@ -98,6 +100,8 @@ void main(void)
}
}
+ finalColor[3] *= dim_factor;
+
/* Expand into a line */
gl_Position.xy += exp_axis * expandSize * expand_dist;