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

armature_shape_solid_frag.glsl « shaders « overlay « engines « draw « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 17e8d0da5d93f5dc69fd447d7df5ae06fa7b022e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

uniform float alpha = 0.6;

in vec4 finalColor;
flat in int inverted;

layout(location = 0) out vec4 fragColor;
layout(location = 1) out vec4 lineOutput;

void main()
{
  /* Manual backface cullling.. Not ideal for performance
   * but needed for view clarity in xray mode and support
   * for inverted bone matrices. */
  if ((inverted == 1) == gl_FrontFacing) {
    discard;
  }
  fragColor = vec4(finalColor.rgb, alpha);
  lineOutput = vec4(0.0);
}