aboutsummaryrefslogtreecommitdiff
path: root/assets/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'assets/shaders')
-rw-r--r--assets/shaders/Basic.frag.glsl4
-rw-r--r--assets/shaders/Basic.vert.glsl3
-rw-r--r--assets/shaders/Deform.frag.glsl29
-rw-r--r--assets/shaders/Fly.frag.glsl23
-rw-r--r--assets/shaders/Julia.frag.glsl25
-rw-r--r--assets/shaders/Keleidoscope.frag.glsl25
-rw-r--r--assets/shaders/Mandel.frag.glsl55
-rw-r--r--assets/shaders/Pulse.frag.glsl22
-rw-r--r--assets/shaders/ReliefTunnel.frag.glsl35
-rw-r--r--assets/shaders/SquareTunnel.frag.glsl21
-rw-r--r--assets/shaders/Star.frag.glsl28
-rw-r--r--assets/shaders/Taper.vert.glsl66
-rw-r--r--assets/shaders/Tunnel.frag.glsl23
-rw-r--r--assets/shaders/Twist.frag.glsl23
-rw-r--r--assets/shaders/Water.frag.glsl55
-rw-r--r--assets/shaders/ZInvert.frag.glsl23
-rw-r--r--assets/shaders/plasma.frag.glsl32
-rw-r--r--assets/shaders/plasma.vert.glsl42
-rw-r--r--assets/shaders/radialBlur.frag.glsl47
19 files changed, 1 insertions, 580 deletions
diff --git a/assets/shaders/Basic.frag.glsl b/assets/shaders/Basic.frag.glsl
index c1f9a5c8..a2c21afa 100644
--- a/assets/shaders/Basic.frag.glsl
+++ b/assets/shaders/Basic.frag.glsl
@@ -11,9 +11,7 @@ precision highp float;
11 11
12 12
13uniform vec4 color; 13uniform vec4 color;
14varying vec4 v_color;
15 14
16void main() { 15void main() {
17 gl_FragColor = v_color; 16 gl_FragColor = color;
18 //gl_FragColor = color;
19} 17}
diff --git a/assets/shaders/Basic.vert.glsl b/assets/shaders/Basic.vert.glsl
index 40b97ad7..0d5b8d63 100644
--- a/assets/shaders/Basic.vert.glsl
+++ b/assets/shaders/Basic.vert.glsl
@@ -14,8 +14,6 @@ precision highp float;
14attribute vec3 a_pos; 14attribute vec3 a_pos;
15attribute vec2 texcoord; 15attribute vec2 texcoord;
16 16
17varying vec4 v_color;
18
19 17
20// matrix uniforms 18// matrix uniforms
21uniform mat4 u_mvMatrix; 19uniform mat4 u_mvMatrix;
@@ -24,6 +22,5 @@ uniform mat4 u_worldMatrix;
24 22
25void main(void) 23void main(void)
26{ 24{
27 v_color = vec4(texcoord.x, texcoord.y, 0, 1);
28 gl_Position = u_projMatrix * u_mvMatrix * vec4(a_pos,1.0) ; 25 gl_Position = u_projMatrix * u_mvMatrix * vec4(a_pos,1.0) ;
29} \ No newline at end of file 26} \ No newline at end of file
diff --git a/assets/shaders/Deform.frag.glsl b/assets/shaders/Deform.frag.glsl
deleted file mode 100644
index 1dbe45a0..00000000
--- a/assets/shaders/Deform.frag.glsl
+++ /dev/null
@@ -1,29 +0,0 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4
5uniform float u_time;
6uniform vec2 u_resolution;
7//uniform vec4 mouse;
8uniform sampler2D u_tex0;
9
10void main(void)
11{
12 vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / u_resolution.xy;
13 //vec2 m = -1.0 + 2.0 * mouse.xy / u_resolution.xy;
14 vec2 m = vec2(-.8, .8);
15
16 float a1 = atan(p.y-m.y,p.x-m.x);
17 float r1 = sqrt(dot(p-m,p-m));
18 float a2 = atan(p.y+m.y,p.x+m.x);
19 float r2 = sqrt(dot(p+m,p+m));
20
21 vec2 uv;
22 uv.x = 0.2*u_time + (r1-r2)*0.25;
23 uv.y = sin(2.0*(a1-a2));
24
25 float w = r1*r2*0.8;
26 vec3 col = texture2D(u_tex0,uv).xyz;
27
28 gl_FragColor = vec4(col/(.1+w),1.0);
29} \ No newline at end of file
diff --git a/assets/shaders/Fly.frag.glsl b/assets/shaders/Fly.frag.glsl
deleted file mode 100644
index f99b5ab8..00000000
--- a/assets/shaders/Fly.frag.glsl
+++ /dev/null
@@ -1,23 +0,0 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4
5uniform vec2 u_resolution;
6uniform float u_time;
7uniform sampler2D u_tex0;
8
9void main(void)
10{
11 vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / u_resolution.xy;
12 vec2 uv;
13
14 float an = u_time*.25;
15
16 float x = p.x*cos(an)-p.y*sin(an);
17 float y = p.x*sin(an)+p.y*cos(an);
18
19 uv.x = .25*x/abs(y);
20 uv.y = .20*u_time + .25/abs(y);
21
22 gl_FragColor = vec4(texture2D(u_tex0,uv).xyz * y*y, 1.0);
23}
diff --git a/assets/shaders/Julia.frag.glsl b/assets/shaders/Julia.frag.glsl
deleted file mode 100644
index 68cda703..00000000
--- a/assets/shaders/Julia.frag.glsl
+++ /dev/null
@@ -1,25 +0,0 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4
5uniform vec2 u_resolution;
6uniform float u_time;
7
8void main(void)
9{
10 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
13 float dmin = 1000.0;
14 vec2 z = p*vec2(1.33,1.0);
15 for( int i=0; i<64; i++ )
16 {
17 z = cc + vec2( z.x*z.x - z.y*z.y, 2.0*z.x*z.y );
18 float m2 = dot(z,z);
19 if( m2>100.0 ) break;
20 dmin=min(dmin,m2);
21 }
22
23 float color = sqrt(sqrt(dmin))*0.7;
24 gl_FragColor = vec4(color,color,color,1.0);
25} \ No newline at end of file
diff --git a/assets/shaders/Keleidoscope.frag.glsl b/assets/shaders/Keleidoscope.frag.glsl
deleted file mode 100644
index 7d1bdb17..00000000
--- a/assets/shaders/Keleidoscope.frag.glsl
+++ /dev/null
@@ -1,25 +0,0 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4
5uniform vec2 u_resolution;
6uniform float u_time;
7uniform sampler2D u_tex0;
8
9void main(void)
10{
11 vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / u_resolution.xy;
12 vec2 uv;
13
14 float a = atan(p.y,p.x);
15 float r = sqrt(dot(p,p));
16
17 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);
19
20 float w = .5+.5*(sin(u_time+7.0*r)+ .7*cos(u_time+7.0*a));
21
22 vec3 col = texture2D(u_tex0,uv*.5).xyz;
23
24 gl_FragColor = vec4(col*w,1.0);
25} \ No newline at end of file
diff --git a/assets/shaders/Mandel.frag.glsl b/assets/shaders/Mandel.frag.glsl
deleted file mode 100644
index 6465899d..00000000
--- a/assets/shaders/Mandel.frag.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4
5uniform vec2 u_resolution;
6uniform float u_time;
7
8void main(void)
9{
10 vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / u_resolution.xy;
11 p.x *= u_resolution.x/u_resolution.y;
12
13 float zoo = .62+.38*sin(.1*u_time);
14 float coa = cos( 0.1*(1.0-zoo)*u_time );
15 float sia = sin( 0.1*(1.0-zoo)*u_time );
16 zoo = pow( zoo,8.0);
17 vec2 xy = vec2( p.x*coa-p.y*sia, p.x*sia+p.y*coa);
18 vec2 cc = vec2(-.745,.186) + xy*zoo;
19
20 vec2 z = vec2(0.0);
21 vec2 z2 = z*z;
22 float m2;
23 float co = 0.0;
24
25
26 // chrome/angelproject/nvidia/glslES don't seem to like to "break" a loop...
27 // so we have to rewrite it in another way
28/*
29 for( int i=0; i<256; i++ )
30 {
31 z = cc + vec2( z.x*z.x - z.y*z.y, 2.0*z.x*z.y );
32 m2 = dot(z,z);
33 if( m2>1024.0 ) break;
34 co += 1.0;
35 }
36*/
37
38 for( int i=0; i<256; i++ )
39 {
40 if( m2<1024.0 )
41 {
42 z = cc + vec2( z.x*z.x - z.y*z.y, 2.0*z.x*z.y );
43 m2 = dot(z,z);
44 co += 1.0;
45 }
46 }
47
48 co = co + 1.0 - log2(.5*log2(m2));
49
50 co = sqrt(co/256.0);
51 gl_FragColor = vec4( .5+.5*cos(6.2831*co+0.0),
52 .5+.5*cos(6.2831*co+0.4),
53 .5+.5*cos(6.2831*co+0.7),
54 1.0 );
55} \ No newline at end of file
diff --git a/assets/shaders/Pulse.frag.glsl b/assets/shaders/Pulse.frag.glsl
deleted file mode 100644
index b24c9bef..00000000
--- a/assets/shaders/Pulse.frag.glsl
+++ /dev/null
@@ -1,22 +0,0 @@
1#ifdef GL_ES
2precision highp float;
3#endif
4
5uniform float u_time;
6uniform vec2 u_resolution;
7uniform sampler2D u_tex0;
8
9void main(void)
10{
11 vec2 halfres = u_resolution.xy/2.0;
12 vec2 cPos = gl_FragCoord.xy;