-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2022-10-08.html
42 lines (34 loc) · 1016 Bytes
/
2022-10-08.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>shader</title>
<link rel="stylesheet" href="style.css">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
</head>
<body>
<canvas></canvas>
<script type="x-shader/x-fragment">
precision mediump float;
uniform vec2 resolution;
uniform float time;
const float PI = 3.14159;
float circle(vec2 p, float r, float w) {
float c = step(length(p), r);
c -= step(length(p), r-w);
return c;
}
void main() {
vec2 uv = gl_FragCoord.xy / resolution.xy;
float c = 0.;
for (float i = 0.; i < 3.; i++) {
float o = length(uv)*uv.y*i*.02+abs(tan(time+i*.05+uv.y+uv.x*.5)*.001);
c += circle(mod(uv - vec2(.5) - o, vec2(.1)) - o*7., .1+i*.4*uv.x*sin(time), .005);
}
gl_FragColor = vec4(vec3(c), 1.);
}
</script>
<script src="veda.js"></script>
</body>
</html>