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-07 16:10:11 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-05-07 18:00:10 +0300
commit8ab3697e2107b955e188f4dec9d264df98e23d97 (patch)
tree7a4ebd8371a6d696b80b0515cb537e04bca03035 /source/blender/draw/modes/shaders
parent2f76e95b96fc87a8ec598c5f8a9242bc220ad9c2 (diff)
Armature: Add new Transparent Bone overlay option.
This is half the replacement of the old wireframe mode. It's not doing any XRay drawing at the moment.
Diffstat (limited to 'source/blender/draw/modes/shaders')
-rw-r--r--source/blender/draw/modes/shaders/armature_shape_solid_frag.glsl2
-rw-r--r--source/blender/draw/modes/shaders/armature_sphere_solid_frag.glsl3
2 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/draw/modes/shaders/armature_shape_solid_frag.glsl b/source/blender/draw/modes/shaders/armature_shape_solid_frag.glsl
index aa455a85cf0..248281f4e79 100644
--- a/source/blender/draw/modes/shaders/armature_shape_solid_frag.glsl
+++ b/source/blender/draw/modes/shaders/armature_shape_solid_frag.glsl
@@ -5,5 +5,5 @@ out vec4 fragColor;
void main()
{
- fragColor = finalColor;
+ fragColor = vec4(finalColor.rgb, 0.6); /* Hardcoded transparency factor. */
}
diff --git a/source/blender/draw/modes/shaders/armature_sphere_solid_frag.glsl b/source/blender/draw/modes/shaders/armature_sphere_solid_frag.glsl
index a431a048282..3c80f629d79 100644
--- a/source/blender/draw/modes/shaders/armature_sphere_solid_frag.glsl
+++ b/source/blender/draw/modes/shaders/armature_sphere_solid_frag.glsl
@@ -73,7 +73,8 @@ void main()
float dither = (0.5 + dot(vec2(ivec2(gl_FragCoord.xy) & ivec2(1)), vec2(1.0, 2.0))) * 0.25;
dither *= (1.0 / 255.0); /* Assume 8bit per color buffer. */
- fragColor = vec4(fragColor.rgb + dither, 1.0);
+ /* Hardcoded transparency factor. Less than shape to be less distractive. */
+ fragColor = vec4(fragColor.rgb + dither, 0.4);
t /= ray_len;
gl_FragDepth = get_depth_from_view_z(ray_dir_view.z * t + ray_ori_view.z);