aboutsummaryrefslogtreecommitdiff
path: root/assets/shaders/radialBlur.frag.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'assets/shaders/radialBlur.frag.glsl')
-rw-r--r--assets/shaders/radialBlur.frag.glsl46
1 files changed, 0 insertions, 46 deletions
diff --git a/assets/shaders/radialBlur.frag.glsl b/assets/shaders/radialBlur.frag.glsl
deleted file mode 100644
index c4520e58..00000000
--- a/assets/shaders/radialBlur.frag.glsl
+++ /dev/null
@@ -1,46 +0,0 @@
1
2precision highp float;
3
4uniform vec2 u_resolution;
5uniform float u_time;
6uniform float u_speed;
7uniform sampler2D u_tex0;
8
9vec3 deform( in vec2 p )
10{
11 vec2 uv;
12
13 float time = u_time * u_speed;
14 vec2 q = vec2( sin(1.1*time+p.x),sin(1.2*time+p.y) );
15
16 float a = atan(q.y,q.x);
17 float r = sqrt(dot(q,q));
18
19 uv.x = sin(0.0+1.0*time)+p.x*sqrt(r*r+1.0);
20 uv.y = sin(0.6+1.1*time)+p.y*sqrt(r*r+1.0);
21
22 return texture2D(u_tex0,uv*.5).xyz;
23}
24
25void main(void)
26{
27 vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / u_resolution.xy;
28 //vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / vec2(500,500).xy;
29 vec2 s = p;
30
31 vec3 total = vec3(0.0);
32 vec2 d = (vec2(0.0,0.0)-p)/40.0;
33 float w = 1.0;
34 for( int i=0; i<40; i++ )
35 {
36 vec3 res = deform(s);
37 res = smoothstep(0.1,1.0,res*res);
38 total += w*res;
39 w *= .99;
40 s += d;
41 }
42 total /= 40.0;
43 float r = 1.5/(1.0+dot(p,p));
44
45 gl_FragColor = vec4( total*r,1.0);
46} \ No newline at end of file