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

gpu_shader_2D_area_borders_frag.glsl « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4ebcb9c397f8df32a924904214aae40a26441b50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef USE_GPU_SHADER_CREATE_INFO
uniform vec4 color;
uniform float scale;

in vec2 uv;

out vec4 fragColor;
#endif

void main()
{
  /* Should be 0.8 but minimize the AA on the edges. */
  float dist = (length(uv) - 0.78) * scale;

  fragColor = color;
  fragColor.a *= smoothstep(-0.09, 1.09, dist);
}