aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/scenegraph/graph/shaders/line.frag
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/scenegraph/graph/shaders/line.frag')
-rw-r--r--examples/quick/scenegraph/graph/shaders/line.frag21
1 files changed, 21 insertions, 0 deletions
diff --git a/examples/quick/scenegraph/graph/shaders/line.frag b/examples/quick/scenegraph/graph/shaders/line.frag
new file mode 100644
index 0000000000..44b5b24c94
--- /dev/null
+++ b/examples/quick/scenegraph/graph/shaders/line.frag
@@ -0,0 +1,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;
+}