aboutsummaryrefslogtreecommitdiff
path: root/assets/shaders/Julia.frag.glsl
diff options
context:
space:
mode:
authorPushkar Joshi2012-02-09 10:55:58 -0800
committerPushkar Joshi2012-02-09 10:55:58 -0800
commit5f42bd1f7723483d374cdd3fe51ef8298c86a1a2 (patch)
tree2404735a87ae1a755a1a301d1560db1c503d0a12 /assets/shaders/Julia.frag.glsl
parentabeb9f1e23679200bb2f4a3ccbcebfb37645975c (diff)
parentfba39dbb3bd64eddf6162fbf57232089e446fb06 (diff)
downloadninja-5f42bd1f7723483d374cdd3fe51ef8298c86a1a2.tar.gz
Merge branch 'pentool' into brushtool
Diffstat (limited to 'assets/shaders/Julia.frag.glsl')
-rw-r--r--assets/shaders/Julia.frag.glsl25
1 files changed, 0 insertions, 25 deletions
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