diff options
author | hwc487 | 2012-07-10 10:00:35 -0700 |
---|---|---|
committer | hwc487 | 2012-07-10 10:00:35 -0700 |
commit | d6613f1e883eaa318fcf2098477eb5eede3d34ba (patch) | |
tree | 4c11db3fa5ece86a7de444caff84ea2d9b312832 /assets/shaders/radialBlur.frag.glsl | |
parent | f83c329796eae9f11630b0d58d1b21d1ff71655a (diff) | |
download | ninja-d6613f1e883eaa318fcf2098477eb5eede3d34ba.tar.gz |
Removed the shaders that we do not have rights to.
Diffstat (limited to 'assets/shaders/radialBlur.frag.glsl')
-rw-r--r-- | assets/shaders/radialBlur.frag.glsl | 46 |
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 | |||
2 | precision highp float; | ||
3 | |||
4 | uniform vec2 u_resolution; | ||
5 | uniform float u_time; | ||
6 | uniform float u_speed; | ||
7 | uniform sampler2D u_tex0; | ||
8 | |||
9 | vec3 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 | |||
25 | void 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 | ||