blob: bf60f874e494954124f0b4f05ecd3d3702ea9fcc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
in vec2 sampleCoord;
out vec4 fragColor;
uniform sampler2D _qt_texture;
uniform vec4 color;
void main()
{
float distance = texture(_qt_texture, sampleCoord).r;
float f = fwidth(distance);
fragColor = color * smoothstep(0.5 - f, 0.5, distance);
}
|