-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2020-07-11.html
35 lines (28 loc) · 983 Bytes
/
2020-07-11.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
<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;
void main() {
vec2 uv = gl_FragCoord.xy / resolution.xy;
float t1 = smoothstep(0.3, 0.7, abs(sin(time+uv.x)));
float t2 = smoothstep(0.3, 0.7, abs(sin(time*+uv.y+0.4)));
float c1 = step(abs(sin(uv.x)) * 0.01, mod(uv.y+sin(uv.x+(time+time*uv.x*0.1)/20.0)*0.5, 0.05));
float c2 = step(abs(sin(uv.x)) * 0.012, mod(uv.y+sin(uv.x+10.0), 0.06));
gl_FragColor = vec4(max(c1, c2), max(c1, c2), max(t2, c1), 1.0);
}
</script>
<script src="veda.js"></script>
</body>
</html>