blob: 80fa05ca3cff72e820128bf589b6a52854160566 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#version 150 core
in vec2 sampleCoord;
out vec4 fragColor;
uniform sampler2D _qt_texture;
uniform vec4 color;
uniform vec4 styleColor;
uniform float alphaMin;
uniform float alphaMax;
uniform float outlineAlphaMax0;
uniform float outlineAlphaMax1;
void main()
{
float d = texture(_qt_texture, sampleCoord).r;
fragColor = mix(styleColor, color, smoothstep(alphaMin, alphaMax, d))
* smoothstep(outlineAlphaMax0, outlineAlphaMax1, d);
}
|