diff options
Diffstat (limited to 'assets')
-rw-r--r-- | assets/shaders/Deform.frag.glsl | 3 | ||||
-rw-r--r-- | assets/shaders/Fly.frag.glsl | 5 | ||||
-rw-r--r-- | assets/shaders/Julia.frag.glsl | 3 | ||||
-rw-r--r-- | assets/shaders/Keleidoscope.frag.glsl | 8 |
4 files changed, 13 insertions, 6 deletions
diff --git a/assets/shaders/Deform.frag.glsl b/assets/shaders/Deform.frag.glsl index 1dbe45a0..a2bb4fa0 100644 --- a/assets/shaders/Deform.frag.glsl +++ b/assets/shaders/Deform.frag.glsl | |||
@@ -3,6 +3,7 @@ precision highp float; | |||
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | uniform float u_time; | 5 | uniform float u_time; |
6 | uniform float u_speed; | ||
6 | uniform vec2 u_resolution; | 7 | uniform vec2 u_resolution; |
7 | //uniform vec4 mouse; | 8 | //uniform vec4 mouse; |
8 | uniform sampler2D u_tex0; | 9 | uniform sampler2D u_tex0; |
@@ -19,7 +20,7 @@ void main(void) | |||
19 | float r2 = sqrt(dot(p+m,p+m)); | 20 | float r2 = sqrt(dot(p+m,p+m)); |
20 | 21 | ||
21 | vec2 uv; | 22 | vec2 uv; |
22 | uv.x = 0.2*u_time + (r1-r2)*0.25; | 23 | uv.x = 0.2*u_time*u_speed + (r1-r2)*0.25; |
23 | uv.y = sin(2.0*(a1-a2)); | 24 | uv.y = sin(2.0*(a1-a2)); |
24 | 25 | ||
25 | float w = r1*r2*0.8; | 26 | float w = r1*r2*0.8; |
diff --git a/assets/shaders/Fly.frag.glsl b/assets/shaders/Fly.frag.glsl index f99b5ab8..d36928a1 100644 --- a/assets/shaders/Fly.frag.glsl +++ b/assets/shaders/Fly.frag.glsl | |||
@@ -4,6 +4,7 @@ precision highp float; | |||
4 | 4 | ||
5 | uniform vec2 u_resolution; | 5 | uniform vec2 u_resolution; |
6 | uniform float u_time; | 6 | uniform float u_time; |
7 | uniform float u_speed; | ||
7 | uniform sampler2D u_tex0; | 8 | uniform sampler2D u_tex0; |
8 | 9 | ||
9 | void main(void) | 10 | void main(void) |
@@ -11,13 +12,13 @@ void main(void) | |||
11 | vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / u_resolution.xy; | 12 | vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / u_resolution.xy; |
12 | vec2 uv; | 13 | vec2 uv; |
13 | 14 | ||
14 | float an = u_time*.25; | 15 | float an = u_time*u_speed*.25; |
15 | 16 | ||
16 | float x = p.x*cos(an)-p.y*sin(an); | 17 | float x = p.x*cos(an)-p.y*sin(an); |
17 | float y = p.x*sin(an)+p.y*cos(an); | 18 | float y = p.x*sin(an)+p.y*cos(an); |
18 | 19 | ||
19 | uv.x = .25*x/abs(y); | 20 | uv.x = .25*x/abs(y); |
20 | uv.y = .20*u_time + .25/abs(y); | 21 | uv.y = .20*u_time*u_speed + .25/abs(y); |
21 | 22 | ||
22 | gl_FragColor = vec4(texture2D(u_tex0,uv).xyz * y*y, 1.0); | 23 | gl_FragColor = vec4(texture2D(u_tex0,uv).xyz * y*y, 1.0); |
23 | } | 24 | } |
diff --git a/assets/shaders/Julia.frag.glsl b/assets/shaders/Julia.frag.glsl index 68cda703..7e616c40 100644 --- a/assets/shaders/Julia.frag.glsl +++ b/assets/shaders/Julia.frag.glsl | |||
@@ -4,11 +4,12 @@ precision highp float; | |||
4 | 4 | ||
5 | uniform vec2 u_resolution; | 5 | uniform vec2 u_resolution; |
6 | uniform float u_time; | 6 | uniform float u_time; |
7 | uniform float u_speed; | ||
7 | 8 | ||
8 | void main(void) | 9 | void main(void) |
9 | { | 10 | { |
10 | vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / u_resolution.xy; | 11 | vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / u_resolution.xy; |
11 | vec2 cc = vec2( cos(.25*u_time), sin(.25*u_time*1.423) ); | 12 | vec2 cc = vec2( cos(.25*u_time*u_speed), sin(.25*u_time*u_speed*1.423) ); |
12 | 13 | ||
13 | float dmin = 1000.0; | 14 | float dmin = 1000.0; |
14 | vec2 z = p*vec2(1.33,1.0); | 15 | vec2 z = p*vec2(1.33,1.0); |
diff --git a/assets/shaders/Keleidoscope.frag.glsl b/assets/shaders/Keleidoscope.frag.glsl index 7d1bdb17..7d95a95b 100644 --- a/assets/shaders/Keleidoscope.frag.glsl +++ b/assets/shaders/Keleidoscope.frag.glsl | |||
@@ -4,20 +4,24 @@ precision highp float; | |||
4 | 4 | ||
5 | uniform vec2 u_resolution; | 5 | uniform vec2 u_resolution; |
6 | uniform float u_time; | 6 | uniform float u_time; |
7 | uniform float u_speed; | ||
7 | uniform sampler2D u_tex0; | 8 | uniform sampler2D u_tex0; |
8 | 9 | ||
9 | void main(void) | 10 | void main(void) |
10 | { | 11 | { |
11 | vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / u_resolution.xy; | 12 | vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / u_resolution.xy; |
12 | vec2 uv; | 13 | vec2 uv; |
14 | |||
15 | float time = u_time * u_speed; | ||
13 | 16 | ||
14 | float a = atan(p.y,p.x); | 17 | float a = atan(p.y,p.x); |
15 | float r = sqrt(dot(p,p)); | 18 | float r = sqrt(dot(p,p)); |
16 | 19 | ||
17 | uv.x = 7.0*a/3.1416; | 20 | uv.x = 7.0*a/3.1416; |
18 | uv.y = -u_time+ sin(7.0*r+u_time) + .7*cos(u_time+7.0*a); | 21 | uv.y = -time + sin(7.0*r+time) + .7*cos( |
22 | +7.0*a); | ||
19 | 23 | ||
20 | float w = .5+.5*(sin(u_time+7.0*r)+ .7*cos(u_time+7.0*a)); | 24 | float w = .5+.5*(sin(time+7.0*r)+ .7*cos(time+7.0*a)); |
21 | 25 | ||
22 | vec3 col = texture2D(u_tex0,uv*.5).xyz; | 26 | vec3 col = texture2D(u_tex0,uv*.5).xyz; |
23 | 27 | ||