From 6321075d93044c6747682a8e7280b5996da7ec52 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Thu, 2 Feb 2012 11:57:58 -0800 Subject: added some additional shaders --- assets/shaders/ZInvert.frag.glsl | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 assets/shaders/ZInvert.frag.glsl (limited to 'assets/shaders/ZInvert.frag.glsl') diff --git a/assets/shaders/ZInvert.frag.glsl b/assets/shaders/ZInvert.frag.glsl new file mode 100644 index 00000000..b1fd1748 --- /dev/null +++ b/assets/shaders/ZInvert.frag.glsl @@ -0,0 +1,23 @@ +#ifdef GL_ES +precision highp float; +#endif + +uniform vec2 u_resolution; +uniform float u_time; +uniform sampler2D u_tex0; + +void main(void) +{ + vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / u_resolution.xy; + vec2 uv; + + float a = atan(p.y,p.x); + float r = sqrt(dot(p,p)); + + uv.x = cos(0.6+u_time) + cos(cos(1.2+u_time)+a)/r; + uv.y = cos(0.3+u_time) + sin(cos(2.0+u_time)+a)/r; + + vec3 col = texture2D(u_tex0,uv*.25).xyz; + + gl_FragColor = vec4(col*r*r,1.0); +} \ No newline at end of file -- cgit v1.2.3