aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/scenegraph/graph/shaders/line.frag
blob: 44b5b24c94640695b1922e1150a6299b486b9a09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#version 440

layout(location = 0) in float vT;

layout(location = 0) out vec4 fragColor;

layout(std140, binding = 0) uniform buf {
    mat4 qt_Matrix;
    vec4 color;
    float qt_Opacity;
    float size;
    float spread;
};

#define PI 3.14159265358979323846

void main(void)
{
    float tt = smoothstep(spread, 1.0, sin(vT * PI));
    fragColor = color * qt_Opacity * tt;
}