-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2022-10-13.html
46 lines (37 loc) · 1.18 KB
/
2022-10-13.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
43
44
45
46
<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(r+10., length(p));
c -= smoothstep(length(p), r-w, r-(w*1.4));
return c;
}
void main() {
vec2 uv = gl_FragCoord.xy / resolution.xy;
vec3 c = vec3(0.);
for (float i = 0.; i < 8.; i++) {
vec2 p = gl_FragCoord.xy - (resolution.xy/vec2(2.)) + sin(uv.x*time+i)*10. + cos(uv.y*time)*30.;
c += vec3(
circle(p, 297., 3. + sin(uv.x*10.0+uv.y*time+time*.001)*13.)*.33,
circle(p, 300., 3. + sin(uv.x*10.2+uv.y*time+time*.001)*13.)*.31,
circle(p, 300., 3. + sin(uv.x*10.5+uv.y*time+time*.001)*13.)*.32);
}
gl_FragColor = vec4(c, 1.);
}
</script>
<script src="veda.js"></script>
</body>
</html>