-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2022-10-15.html
43 lines (34 loc) · 1.01 KB
/
2022-10-15.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
<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 random (vec2 st) {
return fract(tan(dot(st.xy, vec2(100000.)))*100000.);
}
void main() {
vec2 uv = gl_FragCoord.xy/resolution.xy;
if (uv.x > .5) uv.y = 1. - uv.y;
float c = 1.-length(uv - vec2(.125) + vec2(tan(uv.x*uv.y+time*.001*uv.y)));
float n = 8.;
float x = gl_FragCoord.y;
if (mod(time, 20.) > 10.) x = gl_FragCoord.x;
float f = mod(x+uv.x*time, n - (c*n * tan(uv.x+time*.001)));
c = 1.-f;
gl_FragColor = vec4(vec3(c), 1.);
}
</script>
<script src="veda.js"></script>
</body>
</html>