aboutsummaryrefslogtreecommitdiff
path: root/sketches/06/strange.frag
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2023-12-01 18:58:36 +0530
committerAkshay Nair <phenax5@gmail.com>2023-12-01 19:01:06 +0530
commit556968115dbef70ce4bb6211867dedb54920d964 (patch)
treef17960e2b8957cd42e9edb7807946699339500ba /sketches/06/strange.frag
parentf492ce80748cd5862672f6949ef05c2e648ef8b6 (diff)
downloadcreative-coding-playground-556968115dbef70ce4bb6211867dedb54920d964.tar.gz
creative-coding-playground-556968115dbef70ce4bb6211867dedb54920d964.zip
magic circles
Diffstat (limited to '')
-rw-r--r--sketches/06/strange.frag12
1 files changed, 12 insertions, 0 deletions
diff --git a/sketches/06/strange.frag b/sketches/06/strange.frag
new file mode 100644
index 0000000..3abeb33
--- /dev/null
+++ b/sketches/06/strange.frag
@@ -0,0 +1,12 @@
+varying vec4 v_position;
+uniform vec2 u_resolution;
+uniform float u_time;
+
+void main() {
+ float ratio = u_resolution.x / u_resolution.y;
+ vec2 pos = v_position.xy/vec2(1.0, ratio);
+
+ float f = length(fract(pos * 10.0) - 0.5) * exp(-length(pos));
+ f = abs(sin(f*30. + u_time)/3.);
+ gl_FragColor = vec4(f*0.6, f*0.4, f*1.0, 1.0);
+}