summaryrefslogtreecommitdiff
path: root/examples/spheres/shaders/fade.frag
diff options
context:
space:
mode:
Diffstat (limited to 'examples/spheres/shaders/fade.frag')
-rw-r--r--examples/spheres/shaders/fade.frag11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/spheres/shaders/fade.frag b/examples/spheres/shaders/fade.frag
new file mode 100644
index 0000000..71b02f2
--- /dev/null
+++ b/examples/spheres/shaders/fade.frag
@@ -0,0 +1,11 @@
+#version 450
+#extension GL_GOOGLE_include_directive : require
+// Blended over the sky (premultiplied), it moves every pixel `amount` of
+// the way to the background: what was drawn before fades, a long exposure.
+layout(location = 0) out vec4 out_color;
+
+#include "Fade.glsl"
+
+void main() {
+ out_color = vec4(u.background * u.amount, u.amount);
+}