summaryrefslogtreecommitdiff
path: root/s.glsl
diff options
context:
space:
mode:
authorMartin Stensgård <mastensg@mastensg.net>2025-04-20 23:27:35 +0200
committerMartin Stensgård <mastensg@mastensg.net>2025-04-20 23:27:35 +0200
commit81aa75359d1444747331f0b48def800219d46db2 (patch)
treeccf81cf24ebc97b91259b7377ef0e258ca8de4ed /s.glsl
parent79c96a5dabdb5e062b89e90d70ed36cd215300bc (diff)
press f to effect text
Diffstat (limited to 's.glsl')
-rw-r--r--s.glsl20
1 files changed, 20 insertions, 0 deletions
diff --git a/s.glsl b/s.glsl
new file mode 100644
index 0000000..3af1492
--- /dev/null
+++ b/s.glsl
@@ -0,0 +1,20 @@
+#version 100
+
+precision mediump float;
+
+varying vec2 fragTexCoord;
+varying vec4 fragColor;
+
+uniform sampler2D texture0;
+uniform vec4 colDiffuse;
+uniform float u_time;
+
+void main()
+{
+ vec4 tex = texture2D(texture0, fragTexCoord);
+ vec3 a = vec3(1.0, 0.0, 1.0);
+ vec3 b = vec3(0.0, 1.0, 0.0);
+ float m = 0.5 + 0.5*(sin(0.2*gl_FragCoord.x + 5.0*u_time) + cos(0.2*gl_FragCoord.y + 5.0*u_time));
+ //float m = 0.5;
+ gl_FragColor = vec4(mix(a, b, m), tex.a);
+}