This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/draw/modes/shaders/armature_envelope_distance_frag.glsl
Clément Foucault 817cf2a317 Armature: Rename bone shaders and add 2 colors smooth blending.
This will enable us to do more nice stuff in future commits.

This commit is a temporary commit, it will compile but will crash if
trying to display any armature. Next commit does work.
2018-05-05 21:04:21 +02:00

16 lines
284 B
GLSL

flat in vec3 finalStateColor; /* UNUSED */
flat in vec3 finalBoneColor; /* UNUSED */
in vec3 normalView;
out vec4 fragColor;
uniform vec4 color = vec4(1.0, 1.0, 1.0, 0.2);
void main()
{
float n = normalize(normalView).z;
n = 1.0 - clamp(-n, 0.0, 1.0);
fragColor = color * n;
}