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

gpu_shader_3D_polyline_frag.glsl « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9c6b109d65946ee1e795bb15b589d69ec430d677 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

uniform float lineWidth;

in vec4 finalColor;
noperspective in float smoothline;
#ifdef CLIP
in float clip;
#endif

out vec4 fragColor;

#define SMOOTH_WIDTH 1.0

void main()
{
#ifdef CLIP
  if (clip < 0.0) {
    discard;
  }
#endif
  fragColor = finalColor;
  fragColor.a *= clamp((lineWidth + SMOOTH_WIDTH) * 0.5 - abs(smoothline), 0.0, 1.0);
  fragColor = blender_srgb_to_framebuffer_space(fragColor);
}