summaryrefslogtreecommitdiff
path: root/flag.glsl
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-05-15 01:56:06 +0200
committerdec05eba <dec05eba@protonmail.com>2021-05-15 01:56:06 +0200
commitcd05828923f5241b1d71ad211cce5c8605de38fd (patch)
tree6b3eb544e41f4d12a88ec56e0d34e3726c941b66 /flag.glsl
lole
Diffstat (limited to 'flag.glsl')
-rw-r--r--flag.glsl21
1 files changed, 21 insertions, 0 deletions
diff --git a/flag.glsl b/flag.glsl
new file mode 100644
index 0000000..f52c2f2
--- /dev/null
+++ b/flag.glsl
@@ -0,0 +1,21 @@
+uniform sampler2D texture;
+uniform float iTime;
+
+void main() {
+ vec2 uv = gl_TexCoord[0].xy;
+ float sine = sin(uv.x*24.0 - iTime*7.0);
+ float offset = sine*0.04;
+ uv.x -= 0.25;
+ uv.x += offset*0.5*uv.x;
+ uv.y += offset*uv.x*2.0 - 0.25;
+
+ vec4 col = texture2D(texture, uv*2.0);
+ //col.rgb *= (1.0 + (0.0 + 0.5*(offset+0.04)*50.0));
+ col.rgb *= 0.9;
+ col.rgb += 0.1 * -sine;
+
+ if(uv.x < 0.0 || uv.x > 0.5 || uv.y < 0.0 || uv.y > 0.5)
+ col.a = 0.0;
+
+ gl_FragColor = col;
+} \ No newline at end of file