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:
authorClément Foucault <foucault.clem@gmail.com>2018-05-05 21:27:22 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-05-05 22:04:21 +0300
commit3b075d0c8d86551e74672866a1a210adb9f24c24 (patch)
treebb67c759863bb1dac8e6365329acb68f7d9e945a /source/blender/draw/modes/shaders/armature_sphere_outline_vert.glsl
parenteec3fc1273e6c02ab5749a054261287fb0da0f89 (diff)
Armature: Make bone outlines thickness variable.
Diffstat (limited to 'source/blender/draw/modes/shaders/armature_sphere_outline_vert.glsl')
-rw-r--r--source/blender/draw/modes/shaders/armature_sphere_outline_vert.glsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/draw/modes/shaders/armature_sphere_outline_vert.glsl b/source/blender/draw/modes/shaders/armature_sphere_outline_vert.glsl
index b5601e56210..a169facd45a 100644
--- a/source/blender/draw/modes/shaders/armature_sphere_outline_vert.glsl
+++ b/source/blender/draw/modes/shaders/armature_sphere_outline_vert.glsl
@@ -10,7 +10,7 @@ in vec2 pos1;
/* ---- Per instance Attribs ---- */
in mat4 InstanceModelMatrix;
-in vec4 color;
+in vec4 outlineColorSize;
flat out vec4 finalColor;
@@ -91,12 +91,12 @@ void main()
bool outer = ((gl_VertexID & 1) == 1);
- vec2 t = lineThickness / viewportSize;
+ vec2 t = outlineColorSize.w * (lineThickness / viewportSize);
t *= (is_persp) ? abs(V.z) : 1.0;
t = (outer) ? t : vec2(0.0);
gl_Position = p0;
gl_Position.xy += t * edge_dir;
- finalColor = color;
+ finalColor = vec4(outlineColorSize.rgb, 1.0);
}