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: 620568db5004348c422dac3e32fcc9a0a16004ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

uniform vec4 color;
uniform float scale;

in vec2 uv;

out vec4 fragColor;

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);
}