-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest1.frag
More file actions
32 lines (21 loc) · 703 Bytes
/
Copy pathtest1.frag
File metadata and controls
32 lines (21 loc) · 703 Bytes
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
#ifdef GL_ES
precision mediump float;
#endif
#extension GL_OES_standard_derivatives : enable
uniform float u_time;
uniform vec2 mouse;
uniform vec2 u_resolution;
#define STEP t += .5 * (length(mod((vec3(1.0, 0., u_time) + vec3(uv, 1.) * t) + 1., 2.) - 1.) - .5)
#define STEP_8 STEP; STEP; STEP; STEP; STEP; STEP; STEP; STEP
#define STEP_256 STEP_8; STEP_8; STEP_8; STEP_8; STEP_8; STEP_8; STEP_8; STEP_8
void main() {
vec2 uv = (2. * gl_FragCoord.xy - u_resolution) / u_resolution.y;
vec3 col = vec3(0.0314, 0.0902, 0.2863);
float c = cos(u_time / 10.);
float s = sin(u_time / 10.);
uv *= mat2(c, s, -s, c);
float t = 0.;
STEP_256;
col += 1. / t;
gl_FragColor = vec4(col, 1.);
}