-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2023-11-24-09.html
37 lines (31 loc) · 1.02 KB
/
2023-11-24-09.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
<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;
float texture(vec2 uv, vec2 p, float c) {
if (c == 0.) return 0.;
if (mod(gl_FragCoord.x + length(p)*.0001 + floor(sin(time*.1+sin(uv.y*20.)*cos(uv.x)*10.)*3.)*5. + sin((uv.y-.5+sin(time*.5+uv.x)*.3*cos(uv.y+time*.2+p.x))*.05+cos(time*.1+uv.x*20.)*.01)*.002, 6.5) == 0.) return 1.;
return 0.;
}
void main() {
vec2 uv = gl_FragCoord.xy/resolution.xy;
vec2 p = abs(uv - .5 + sin(time*.1*uv.x)*.2);
float c = step(length(p), .2);
c = texture(uv, p, c);
gl_FragColor = vec4(vec3(c), 1.);
}
</script>
<script src="veda.js"></script>
</body>
</html>