diff --git a/08/matrix.frag b/08/matrix.frag index fa25838..c6e13e9 100644 --- a/08/matrix.frag +++ b/08/matrix.frag @@ -5,6 +5,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + uniform vec2 u_resolution; uniform vec2 u_mouse; uniform float u_time; diff --git a/08/tmp/circleWave.frag b/08/tmp/circleWave.frag deleted file mode 100644 index 4fb0996..0000000 --- a/08/tmp/circleWave.frag +++ /dev/null @@ -1,42 +0,0 @@ -// Author @patriciogv - 2015 -// http://patriciogonzalezvivo.com - -// My own port of this processing code by @beesandbombs -// https://dribbble.com/shots/1696376-Circle-wave - -#ifdef GL_ES -precision mediump float; -#endif - -uniform vec2 u_resolution; -uniform vec2 u_mouse; -uniform float u_time; - -mat2 rotate2d(float _angle){ - return mat2(cos(_angle),-sin(_angle), - sin(_angle),cos(_angle)); -} - -float circleWave(vec2 st, float radius) { - st = vec2(0.5)-st; - float r = length(st)*2.0; - float a = atan(st.y,st.x); - float m = abs(mod(a+u_time*2.,3.14*2.)-3.14)/3.6; - float f = (cos(a*10.)*.1*pow(m,2.))+radius; - return 1.-smoothstep(f,f+0.007,r); -} - -float circleWaveLine(vec2 st, float radius, float width) { - return circleWave(st,radius)-circleWave(st,radius-width); -} - -void main() { - vec2 st = gl_FragCoord.xy/u_resolution.xy; - vec3 color = vec3(1.0) * circleWaveLine(st,0.8,0.02); - st -= vec2(0.5); - st = rotate2d(.314)*st; - st += vec2(0.5); - color = mix(color,vec3(1.0),circleWaveLine(st,0.8,0.02)); - - gl_FragColor = vec4( color, 1.0 ); -} diff --git a/08/tmp/circleWave2.frag b/08/tmp/circleWave2.frag deleted file mode 100644 index af0eba8..0000000 --- a/08/tmp/circleWave2.frag +++ /dev/null @@ -1,50 +0,0 @@ -// Author @patriciogv - 2015 -// http://patriciogonzalezvivo.com - -// My own port of this processing code by @beesandbombs -// https://dribbble.com/shots/1698964-Circle-wave-II. - -#ifdef GL_ES -precision mediump float; -#endif - -uniform vec2 u_resolution; -uniform vec2 u_mouse; -uniform float u_time; - -mat2 rotate2d(float _angle){ - return mat2(cos(_angle),-sin(_angle), - sin(_angle),cos(_angle)); -} - -float circleWave(vec2 st, float radius) { - st = vec2(0.5)-st; - float r = length(st)*2.0; - float a = atan(st.y,st.x); - float m = abs(mod(a+u_time*2.,3.14*2.)-3.14)/3.6; - float f = cos(a*10.)*.1*pow(m,3.)+radius; - return 1.-smoothstep(f,f+0.007,r); -} - -float circleWaveLine(vec2 st, float radius, float width) { - return circleWave(st,radius)-circleWave(st,radius-width); -} - -void main() { - vec2 st = gl_FragCoord.xy/u_resolution.xy; - vec3 color = vec3(0.0); - float alpha = .8; - float size = .8; - float width = 0.03; - color += vec3(1.000,0.232,0.565) * circleWaveLine(st,size,width) * alpha; - st -= vec2(0.5); - st = rotate2d(1.004)*st; - st += vec2(0.5); - color += vec3(0.267,.850,0.308) * circleWaveLine(st,size,width) * alpha; - st -= vec2(0.5); - st = rotate2d(1.04)*st; - st += vec2(0.5); - color += vec3(0.489,0.630,1.000) * circleWaveLine(st,size,width) * alpha; - - gl_FragColor = vec4( color, 1.0 ); -} diff --git a/08/tmp/cross-doted.frag b/08/tmp/cross-doted.frag deleted file mode 100644 index b2d15c3..0000000 --- a/08/tmp/cross-doted.frag +++ /dev/null @@ -1,50 +0,0 @@ -// Author @patriciogv ( patriciogonzalezvivo.com ) - 2015 - -#ifdef GL_ES -precision mediump float; -#endif - -#define PI 3.14159265359 - -uniform vec2 u_resolution; -uniform float u_time; - -mat2 rotate2d(float angle){ - return mat2(cos(angle),-sin(angle), - sin(angle),cos(angle)); -} - -float boxDF(vec2 st, float size) { - st = st*2.-1.; - return length(max(abs(st)-size,.0)); -} - -float box(vec2 st, float size, float radio) { - radio = max(radio,.000001); - return 1.-step(radio,boxDF(st,size-radio)); -} - -float cross(vec2 st, float radio) { - float size = .25; - size *= (1.0-radio*2.); - return box(st,size,radio) + - box(st+vec2(.0,size*(1.0-radio*2.)),size,min(radio,size)) + - box(st+vec2(.0,-size*(1.0-radio*2.)),size,min(radio,size)) + - box(st+vec2(size*(1.0-radio*2.),.0),size,min(radio,size)) + - box(st+vec2(-size*(1.0-radio*2.),.0),size,min(radio,size)); -} - -void main(){ - vec2 st = gl_FragCoord.xy/u_resolution.xy; - st.x *= u_resolution.x/u_resolution.y; - vec3 color = vec3(0.0); - - st -= vec2(0.5); - st = rotate2d( sin(u_time)*PI ) * st; - st += vec2(0.5); - - // Add the shape on the foreground - color += cross(st,(1.0-abs(sin(u_time)))*.5); - - gl_FragColor = vec4(color,1.0); -} diff --git a/08/tmp/cross.frag b/08/tmp/cross.frag deleted file mode 100644 index 992a307..0000000 --- a/08/tmp/cross.frag +++ /dev/null @@ -1,26 +0,0 @@ -// Author @patriciogv ( patriciogonzalezvivo.com ) - 2015 - -#ifdef GL_ES -precision mediump float; -#endif - -uniform vec2 u_resolution; -uniform float u_time; - -float box(vec2 _st, vec2 _size){ - _size = vec2(0.5) - _size*0.5; - vec2 uv = smoothstep(_size, - _size+vec2(0.0001), - _st); - uv *= smoothstep(_size, - _size+vec2(0.0001), - vec2(1.0)-_st); - return uv.x*uv.y; -} - -void main(){ - vec2 st = gl_FragCoord.xy/u_resolution.xy; - - float pct = box(st, vec2(0.9,0.3)) + box(st, vec2(0.3,0.9)); - gl_FragColor = vec4( vec3(1.-pct),pct ); -} diff --git a/08/tmp/linesWave.frag b/08/tmp/linesWave.frag deleted file mode 100644 index 63176b1..0000000 --- a/08/tmp/linesWave.frag +++ /dev/null @@ -1,35 +0,0 @@ -// Author @patriciogv - 2015 -// http://patriciogonzalezvivo.com - -#ifdef GL_ES -precision mediump float; -#endif - -uniform vec2 u_resolution; -uniform vec2 u_mouse; -uniform float u_time; - -mat2 rotate2d(float angle){ - return mat2(cos(angle),-sin(angle), - sin(angle),cos(angle)); -} - -float stripes(vec2 st, float angle){ - st = rotate2d(angle) * st*10.; - return 1.0-abs(sin(st.x*3.1415)); -} - -void main() { - vec2 st = gl_FragCoord.xy/u_resolution.xy; - vec3 color = vec3(.0); - - vec2 pos = vec2(0.5)-st; - float t = u_time*.5; - float r = dot(pos,pos)*4.; - - st *= 2.; - float pattern = sin(fract(r+t)*3.1415); - pattern = mix(stripes(st,-0.786375),stripes(st,0.786375),pattern); - - gl_FragColor = vec4( vec3(smoothstep(.4,.5,pattern)), 1.0 ); -} diff --git a/09/checks.frag b/09/checks.frag index 118fcf2..d19e712 100644 --- a/09/checks.frag +++ b/09/checks.frag @@ -4,6 +4,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + uniform vec2 u_resolution; uniform float u_time; diff --git a/09/cross.frag b/09/cross.frag index 7fa15a1..d8fff9f 100644 --- a/09/cross.frag +++ b/09/cross.frag @@ -4,6 +4,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + uniform vec2 u_resolution; uniform vec2 u_mouse; uniform float u_time; diff --git a/09/deco.frag b/09/deco.frag index 307fd20..dbb0393 100644 --- a/09/deco.frag +++ b/09/deco.frag @@ -5,6 +5,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + uniform vec2 u_resolution; uniform vec2 u_mouse; uniform float u_time; diff --git a/09/diamondtiles.frag b/09/diamondtiles.frag index 70a7ad9..5c55a1a 100644 --- a/09/diamondtiles.frag +++ b/09/diamondtiles.frag @@ -5,6 +5,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + #define PI 3.14159265358979323846 uniform vec2 u_resolution; diff --git a/09/dots.frag b/09/dots.frag index 77ed704..0708880 100644 --- a/09/dots.frag +++ b/09/dots.frag @@ -4,6 +4,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + uniform vec2 u_resolution; uniform vec2 u_mouse; uniform float u_time; diff --git a/09/dots1.frag b/09/dots1.frag index c62bb0d..90078c5 100644 --- a/09/dots1.frag +++ b/09/dots1.frag @@ -4,6 +4,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + uniform vec2 u_resolution; uniform vec2 u_mouse; uniform float u_time; diff --git a/09/dots2.frag b/09/dots2.frag index 1f8a7e1..986e7dc 100644 --- a/09/dots2.frag +++ b/09/dots2.frag @@ -4,6 +4,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + uniform vec2 u_resolution; uniform vec2 u_mouse; uniform float u_time; diff --git a/09/dots3.frag b/09/dots3.frag index d97fba3..9a830e6 100644 --- a/09/dots3.frag +++ b/09/dots3.frag @@ -4,6 +4,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + #define PI 3.14159265358979323846 uniform vec2 u_resolution; diff --git a/09/dots4.frag b/09/dots4.frag index 8148f5b..3b51ae3 100644 --- a/09/dots4.frag +++ b/09/dots4.frag @@ -4,6 +4,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + #define PI 3.14159265358979323846 uniform vec2 u_resolution; diff --git a/09/iching-01.frag b/09/iching-01.frag index 92906ff..fa4bcc1 100644 --- a/09/iching-01.frag +++ b/09/iching-01.frag @@ -5,6 +5,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + #define PI 3.14159265359 #define TWO_PI 6.28318530718 diff --git a/09/lines.frag b/09/lines.frag index c423f2f..3972736 100644 --- a/09/lines.frag +++ b/09/lines.frag @@ -4,6 +4,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + const float PI = 3.1415926535897932384626433832795; uniform vec2 u_resolution; diff --git a/09/mirrortiles.frag b/09/mirrortiles.frag index a23f40f..06bbd10 100644 --- a/09/mirrortiles.frag +++ b/09/mirrortiles.frag @@ -4,6 +4,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + #define PI 3.14159265358979323846 uniform vec2 u_resolution; diff --git a/09/nuts.frag b/09/nuts.frag index a20bc5b..9e36b84 100644 --- a/09/nuts.frag +++ b/09/nuts.frag @@ -4,6 +4,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + #define PI 3.14159265358979323846 uniform vec2 u_resolution; diff --git a/09/rotatedtiles.frag b/09/rotatedtiles.frag index 5988124..06942fb 100644 --- a/09/rotatedtiles.frag +++ b/09/rotatedtiles.frag @@ -4,6 +4,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + #define PI 3.14159265358979323846 #define TWO_PI 6.28318530717958647693 diff --git a/09/tmp/checker.frag b/09/tmp/checker.frag deleted file mode 100644 index 910a707..0000000 --- a/09/tmp/checker.frag +++ /dev/null @@ -1,32 +0,0 @@ -// Author @patriciogv ( patriciogonzalezvivo.com ) - 2015 - -#ifdef GL_ES -precision mediump float; -#endif - -uniform vec2 u_resolution; -uniform vec2 u_mouse; -uniform float u_time; - -vec2 tile(vec2 _st, float _zoom){ - _st *= _zoom; - return fract(_st); -} - -float circle(vec2 _st, float _radius){ - vec2 pos = vec2(0.5)-_st; - _radius *= 0.75; - return 1.-smoothstep(_radius-(_radius*0.05),_radius+(_radius*0.05),dot(pos,pos)*3.14); -} - -void main(){ - - vec2 st = gl_FragCoord.xy/u_resolution.xy; - st.x *= u_resolution.x/u_resolution.y; - - float pct = 0.0; - vec2 st_i = floor(st*10.); - pct += abs(mod(st_i.x,2.)-mod(st_i.y,2.)); - - gl_FragColor = vec4(vec3(pct),1.0); -} diff --git a/09/tmp/dots-animation.frag b/09/tmp/dots-animation.frag deleted file mode 100644 index ed105cd..0000000 --- a/09/tmp/dots-animation.frag +++ /dev/null @@ -1,45 +0,0 @@ -// Author @patriciogv ( patriciogonzalezvivo.com ) - 2015 - -#ifdef GL_ES -precision mediump float; -#endif - -uniform vec2 u_resolution; -uniform vec2 u_mouse; -uniform float u_time; - -float rows = 10.0; - -vec2 brickTile(vec2 _st, float _zoom){ - _st *= _zoom; - if (fract(_st.y * 0.5) > 0.5){ - _st.x += 0.5; - } - return fract(_st); -} - -float circle(vec2 _st, float _radius){ - vec2 pos = vec2(0.5)-_st; - _radius *= 0.75; - return 1.-smoothstep(_radius-(_radius*0.01),_radius+(_radius*0.01),dot(pos,pos)*3.14); -} - -void main(){ - - vec2 st = gl_FragCoord.xy/u_resolution.xy; - st.x *= u_resolution.x/u_resolution.y; - - vec2 pos = vec2(0.5)-st; - - st = brickTile(st,20.); - - float t = u_time*.5; - float r = dot(pos,pos)*4.; - - st *= 2.; - float pattern = sin(fract(r+t)*3.1415); - - vec3 color = vec3(circle(st, pattern)); - - gl_FragColor = vec4(color,1.0); -} diff --git a/09/tmp/dots-texture.frag b/09/tmp/dots-texture.frag deleted file mode 100644 index 5d9932a..0000000 --- a/09/tmp/dots-texture.frag +++ /dev/null @@ -1,47 +0,0 @@ -// Author @patriciogv ( patriciogonzalezvivo.com ) - 2015 - -#ifdef GL_ES -precision mediump float; -#endif - -uniform sampler2D u_tex0; -uniform vec2 u_resolution; -uniform vec2 u_mouse; -uniform float u_time; - -float rows = 100.0; - -vec2 brickTile(vec2 _st, float _zoom){ - _st *= _zoom; - if (fract(_st.y * 0.5) > 0.5) { - _st.x += 0.5; - } - return fract(_st); -} - -float circle(vec2 _st, float _radius){ - vec2 pos = vec2(0.5)-_st; - _radius *= 0.75; - return 1.-smoothstep(_radius-(_radius*0.01),_radius+(_radius*0.01),dot(pos,pos)*3.14); -} - -void main(){ - - vec2 st = gl_FragCoord.xy/u_resolution.xy; - st = (st-.5)*1.02+.5; - st.x *= u_resolution.x/u_resolution.y; - - vec2 pos = st; - float grid = 50.; - - st *= grid; - if (fract(st.y * 0.5) > 0.5){ - st.x += 0.5; - pos.x += 0.5/grid; - } - - float pattern = texture2D(u_tex0,clamp(floor(pos*grid)/grid+vec2(.5,.5)/grid,vec2(0.),vec2(1.))).r; - pattern = circle(fract(st), smoothstep(0.1,1.,pattern)); - - gl_FragColor = vec4(pattern,0.,0.,pattern); -} diff --git a/09/tmp/dots-tide.frag b/09/tmp/dots-tide.frag deleted file mode 100644 index 6a0b78a..0000000 --- a/09/tmp/dots-tide.frag +++ /dev/null @@ -1,33 +0,0 @@ -// Author @patriciogv ( patriciogonzalezvivo.com ) - 2015 - -#ifdef GL_ES -precision mediump float; -#endif - -uniform vec2 u_resolution; -uniform vec2 u_mouse; -uniform float u_time; - -vec2 tile(vec2 _st, float _zoom){ - _st *= _zoom; - return fract(_st); -} - -float circle(vec2 _st, float _radius){ - vec2 pos = vec2(0.5)-_st; - _radius *= 0.75; - return 1.-smoothstep(_radius-(_radius*0.05),_radius+(_radius*0.05),dot(pos,pos)*3.14); -} - -void main(){ - - vec2 st = gl_FragCoord.xy/u_resolution.xy; - st.x *= u_resolution.x/u_resolution.y; - st = tile(st,5.); - float size = .45; - float pct = circle(st,size); - st = abs(st-.5); - pct += circle(st,size); - - gl_FragColor = vec4(vec3(pct),1.0); -} diff --git a/09/tmp/dots-zoom-00.frag b/09/tmp/dots-zoom-00.frag deleted file mode 100644 index 03518b1..0000000 --- a/09/tmp/dots-zoom-00.frag +++ /dev/null @@ -1,68 +0,0 @@ -// Author @patriciogv ( patricio.io ) - 2015 -// Inspired by the Patterns of Nina Warmerdam ( www.behance.net/ninawarmerdam ) -#ifdef GL_OES_standard_derivatives -#extension GL_OES_standard_derivatives : enable -#endif - -#ifdef GL_ES -precision mediump float; -#endif - -uniform vec2 u_resolution; -uniform vec2 u_mouse; -uniform float u_time; - -float aastep(float threshold, float value) { - #ifdef GL_OES_standard_derivatives - float afwidth = length(vec2(dFdx(value), dFdy(value))) * 0.70710678118654757; - return smoothstep(threshold-afwidth, threshold+afwidth, value); - #else - return step(threshold, value); - #endif -} -vec2 brickTile(vec2 st, float zoom){ - st *= zoom; - if (fract(st.y * 0.5) > 0.5){ - st.x += 0.5; - } - return fract(st); -} -float circleDF(vec2 st){ - vec2 pos = vec2(0.5)-st; - return dot(pos,pos)*3.14; -} -float circle(vec2 st, float radius){ - radius *= 0.75; - return 1.-aastep(radius,circleDF(st)); -} - -float dots(vec2 st, float size){ - st = brickTile(st, 2.); - return circle(st, size); -} - -float dotsDF(vec2 st){ - st = brickTile(st, 2.); - return circleDF(st); -} - -void main(){ - vec2 st = gl_FragCoord.xy/u_resolution.xy; - st.x *= u_resolution.x/u_resolution.y; - vec3 color = vec3(0.0); - - vec2 IN = st; - vec2 OUT = st*2.; - - float pct = 1.0-fract(u_mouse.y/u_resolution.y); - pct = pow(pct,6.); - - float d = 0.0; - // d = mix(dots(fract(IN),(1.-pct)), dots(fract(OUT),pct), pct); - // d = mix(dotsDF(fract(IN)), dotsDF(fract(OUT)), pct); - d = dotsDF(fract(IN))*(1.-pct) + dotsDF(fract(OUT))*pct; - d = aastep(.21,d); - color = vec3(d); - - gl_FragColor = vec4(color,1.0); -} diff --git a/09/tmp/dots-zoom-01.frag b/09/tmp/dots-zoom-01.frag deleted file mode 100644 index 7ab6421..0000000 --- a/09/tmp/dots-zoom-01.frag +++ /dev/null @@ -1,58 +0,0 @@ -// Author @patriciogv ( patricio.io ) - 2015 -// Inspired by the Patterns of Nina Warmerdam ( www.behance.net/ninawarmerdam ) -#ifdef GL_OES_standard_derivatives -#extension GL_OES_standard_derivatives : enable -#endif - -#ifdef GL_ES -precision mediump float; -#endif - -uniform vec2 u_resolution; -uniform vec2 u_mouse; -uniform float u_time; - -float aastep(float threshold, float value) { - #ifdef GL_OES_standard_derivatives - float afwidth = length(vec2(dFdx(value), dFdy(value))) * 0.70710678118654757; - return smoothstep(threshold-afwidth, threshold+afwidth, value); - #else - return step(threshold, value); - #endif -} -vec2 brickTile(vec2 st, float zoom){ - st *= zoom; - if (fract(st.y * 0.5) > 0.5){ - st.x += 0.5; - } - return fract(st); -} - -float circleDF(vec2 st){ - return dot(st,st); -} - -void main(){ - vec2 st = gl_FragCoord.xy/u_resolution.xy; - st.x *= u_resolution.x/u_resolution.y; - vec3 color = vec3(0.0); - - vec2 IN = st; - vec2 OUT = st*2.; - - float pct = 1.0-fract(u_mouse.y/u_resolution.y); - - float A = circleDF(vec2(0.5)-st); - float B = circleDF(vec2(0.25)-st)*5.; - B = min(B, circleDF(vec2(0.75,0.25)-st)*5.); - B = min(B, circleDF(vec2(0.5,0.75)-st)*5.); - B = min(B, circleDF(vec2(0.,0.75)-st)*5.); - B = min(B, circleDF(vec2(1.,0.75)-st)*5.); - - float d = 0.0; - d = mix(A,B,pct); - d = aastep(.21,d); - color = vec3(d); - - gl_FragColor = vec4(color,1.0); -} diff --git a/09/tmp/dots.frag b/09/tmp/dots.frag deleted file mode 100644 index 77ed704..0000000 --- a/09/tmp/dots.frag +++ /dev/null @@ -1,30 +0,0 @@ -// Author @patriciogv ( patriciogonzalezvivo.com ) - 2015 - -#ifdef GL_ES -precision mediump float; -#endif - -uniform vec2 u_resolution; -uniform vec2 u_mouse; -uniform float u_time; - -vec2 tile(vec2 _st, float _zoom){ - _st *= _zoom; - return fract(_st); -} - -float circle(vec2 _st, float _radius){ - vec2 pos = vec2(0.5)-_st; - _radius *= 0.75; - return 1.-smoothstep(_radius-(_radius*0.05),_radius+(_radius*0.05),dot(pos,pos)*3.14); -} - -void main(){ - - vec2 st = gl_FragCoord.xy/u_resolution.xy; - st.x *= u_resolution.x/u_resolution.y; - st = tile(st,5.); - vec3 color = vec3(circle(st, 0.2)); - - gl_FragColor = vec4(color,1.0); -} diff --git a/09/tmp/grid-fine.frag b/09/tmp/grid-fine.frag deleted file mode 100644 index 1b8d2c9..0000000 --- a/09/tmp/grid-fine.frag +++ /dev/null @@ -1,28 +0,0 @@ -// Author @patriciogv - 2015 - patricio.io - -#ifdef GL_ES -precision mediump float; -#endif - -#define PI 3.14159265358979323846 - -uniform vec2 u_resolution; -uniform vec2 u_mouse; -uniform float u_time; - -bool grid(vec2 _pos, float _res){ - vec2 grid = fract(_pos*_res*250.); - return grid.x < _res || grid.y < _res; -} - -void main(){ - vec2 st = gl_FragCoord.xy/u_resolution.xy-vec2(.5); - st.x *= u_resolution.x/u_resolution.y; - - vec3 color = vec3(0.0); - - if(grid(st,0.01)) color += vec3(0.25); - if(grid(st,0.1)) color += vec3(0.15); - - gl_FragColor = vec4(color,1.0); -} diff --git a/09/tmp/grid-warp.frag b/09/tmp/grid-warp.frag deleted file mode 100644 index 10dbab1..0000000 --- a/09/tmp/grid-warp.frag +++ /dev/null @@ -1,33 +0,0 @@ -// Author @patriciogv ( patriciogonzalezvivo.com ) - 2015 - -#ifdef GL_ES -precision mediump float; -#endif - -uniform vec2 u_resolution; -uniform float u_time; - -vec2 tile(vec2 _st, float _zoom){ - _st *= _zoom; - return fract(_st); -} - -float X(vec2 _st, float _width){ - float pct0 = smoothstep(_st.x-_width,_st.x,_st.y); - pct0 *= 1.-smoothstep(_st.x,_st.x+_width,_st.y); - - float pct1 = smoothstep(_st.x-_width,_st.x,1.0-_st.y); - pct1 *= 1.-smoothstep(_st.x,_st.x+_width,1.0-_st.y); - - return pct0+pct1; -} - -void main(void){ - vec2 st = gl_FragCoord.xy/u_resolution.xy; - st.y *= u_resolution.y/u_resolution.x; - - vec2 xy = st-vec2(.5); - float grid = 1.0-X(tile(xy,10.+20.0*dot(xy,xy)),0.05); - - gl_FragColor = vec4(vec3(grid),1.0); -} diff --git a/09/tmp/lines-thin.frag b/09/tmp/lines-thin.frag deleted file mode 100644 index 756d3db..0000000 --- a/09/tmp/lines-thin.frag +++ /dev/null @@ -1,38 +0,0 @@ -// Author @patriciogv - 2015 - patricio.io -#extension GL_OES_standard_derivatives : enable -#ifdef GL_ES -precision mediump float; -#endif - -const float PI = 3.1415926535897932384626433832795; - -uniform vec2 u_resolution; -uniform vec2 u_mouse; -uniform float u_time; - -float aastep(float threshold, float value) { - #ifdef GL_OES_standard_derivatives - float afwidth = length(vec2(dFdx(value), dFdy(value))) * 0.70710678118654757; - return smoothstep(threshold-afwidth, threshold+afwidth, value); - #else - return step(threshold, value); - #endif -} - -mat2 rotate2d(float angle){ - return mat2(cos(angle),-sin(angle), - sin(angle),cos(angle)); -} -float stripes(vec2 st){ - st = rotate2d(.72)*st; - st *= 92.; - return aastep(.3,abs(sin(st.y*3.14159265358))); -} - -void main(){ - vec2 st = gl_FragCoord.xy/u_resolution.xy; - st.x *= u_resolution.x/u_resolution.y; - - vec3 color = vec3(stripes(st)); - gl_FragColor = vec4(color, 1.0); -} diff --git a/09/tmp/lines-wave.frag b/09/tmp/lines-wave.frag deleted file mode 100644 index 0cfc62b..0000000 --- a/09/tmp/lines-wave.frag +++ /dev/null @@ -1,34 +0,0 @@ -// Author @patriciogv - 2015 - patricio.io -#extension GL_OES_standard_derivatives : enable -#ifdef GL_ES -precision mediump float; -#endif - -const float PI = 3.1415926535897932384626433832795; - -uniform vec2 u_resolution; -uniform vec2 u_mouse; -uniform float u_time; - -float aastep(float threshold, float value) { - #ifdef GL_OES_standard_derivatives - float afwidth = length(vec2(dFdx(value), dFdy(value))) * 0.70710678118654757; - return smoothstep(threshold-afwidth, threshold+afwidth, value); - #else - return step(threshold, value); - #endif -} - -float stripes(vec2 st, float width){ - return aastep(width,abs(sin(st.y*3.14159265358))); -} - -void main(){ - vec2 st = gl_FragCoord.xy/u_resolution.xy; - st.x *= u_resolution.x/u_resolution.y; - - vec2 pos = st; - pos.y += sin(pos.x*30.)*.01; - vec3 color = vec3(stripes(pos*92.,.4)); - gl_FragColor = vec4(color, 1.0); -} diff --git a/09/tmp/lines-zigzag.frag b/09/tmp/lines-zigzag.frag deleted file mode 100644 index 603aa03..0000000 --- a/09/tmp/lines-zigzag.frag +++ /dev/null @@ -1,35 +0,0 @@ -// Author @patriciogv - 2015 - patricio.io -#extension GL_OES_standard_derivatives : enable -#ifdef GL_ES -precision mediump float; -#endif - -const float PI = 3.1415926535897932384626433832795; - -uniform vec2 u_resolution; -uniform vec2 u_mouse; -uniform float u_time; - -float aastep(float threshold, float value) { - #ifdef GL_OES_standard_derivatives - float afwidth = length(vec2(dFdx(value), dFdy(value))) * 0.70710678118654757; - return smoothstep(threshold-afwidth, threshold+afwidth, value); - #else - return step(threshold, value); - #endif -} - -float stripes(vec2 st, float width){ - return aastep(width,abs(sin(st.y*3.14159265358))); -} - -void main(){ - vec2 st = gl_FragCoord.xy/u_resolution.xy; - st.x *= u_resolution.x/u_resolution.y; - - vec2 pos = fract(st*30.); - pos.y += mix(fract(pos.x),fract(1.0-pos.x),step(.5,pos.x))*3.; - vec3 color = vec3(stripes(pos,.3)); - - gl_FragColor = vec4(color, 1.0); -} diff --git a/09/tmp/moon.jpg b/09/tmp/moon.jpg deleted file mode 100644 index e0f84e9..0000000 Binary files a/09/tmp/moon.jpg and /dev/null differ diff --git a/09/tmp/seamless-tile.frag b/09/tmp/seamless-tile.frag deleted file mode 100644 index 99a6b1b..0000000 --- a/09/tmp/seamless-tile.frag +++ /dev/null @@ -1,41 +0,0 @@ -// Author @patriciogv ( patriciogonzalezvivo.com ) - 2015 - -#ifdef GL_ES -precision mediump float; -#endif - -uniform vec2 u_resolution; -uniform float u_time; - -vec2 tile (vec2 st, float _zoom) { - st *= _zoom; - return fract(st); -} - -vec2 seamlessTile(vec2 st){ - st *= 2.0; - float index = 0.0; - index += step(1., mod(st.x,2.0)); - index += step(1., mod(st.y,2.0))*2.0; - st = fract(st); - if(index == 1.0){ - st.x = 1.0-st.x; - } else if(index == 2.0){ - st.y = 1.0-st.y; - } else if(index == 3.0){ - st = 1.0-st; - } - return st; -} - -void main (void) { - vec2 st = gl_FragCoord.xy/u_resolution.xy; - - st = tile(st,1.0); - st = seamlessTile(st); - - - // step(st.x,st.y) just makes a b&w triangles - // but you can use whatever design you want. - gl_FragColor = vec4(vec3(step(st.x,st.y)),1.0); -} diff --git a/09/zigzag.frag b/09/zigzag.frag index fddfa1c..4a64cd7 100644 --- a/09/zigzag.frag +++ b/09/zigzag.frag @@ -5,6 +5,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + uniform vec2 u_resolution; uniform vec2 u_mouse; uniform float u_time; diff --git a/10/iching-02.frag b/10/iching-02.frag index 47d8f2c..74c3e69 100644 --- a/10/iching-02.frag +++ b/10/iching-02.frag @@ -5,6 +5,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + #define PI 3.14159265359 #define TWO_PI 6.28318530718 diff --git a/10/ikeda-00.frag b/10/ikeda-00.frag index 561e65b..225ec02 100644 --- a/10/ikeda-00.frag +++ b/10/ikeda-00.frag @@ -5,6 +5,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + uniform vec2 u_resolution; uniform vec2 u_mouse; uniform float u_time; diff --git a/10/ikeda-01.frag b/10/ikeda-01.frag deleted file mode 100644 index 85c6d85..0000000 --- a/10/ikeda-01.frag +++ /dev/null @@ -1,36 +0,0 @@ -// Author @patriciogv - 2015 -// Title: Wave - -#ifdef GL_ES -precision mediump float; -#endif - -uniform vec2 u_resolution; -uniform vec2 u_mouse; -uniform float u_time; - -float random (in float x) { return fract(sin(x)*1e4); } -float random (in vec2 st) { return fract(sin(dot(st.xy, vec2(12.9898,78.233)))* 43758.5453123); } - -void main() { - vec2 st = gl_FragCoord.xy/u_resolution.xy; - st.x *= u_resolution.x/u_resolution.y; - - vec3 color = vec3(0.0); - - vec2 grid = vec2(100.0,2.0); - - float t = u_time*max(grid.x,grid.y); - - vec2 ipos = floor(st*grid); - vec2 fpos = fract(st*grid); - - float value = random(floor(ipos.x+t)); - - if (mod(ipos.y,2.) == 0.) { - fpos = 1.0-fpos; - } - color += step(fpos.y*1.5,value); - - gl_FragColor = vec4(color,1.0); -} diff --git a/10/ikeda-01.png b/10/ikeda-01.png deleted file mode 100644 index 4399a8c..0000000 Binary files a/10/ikeda-01.png and /dev/null differ diff --git a/10/ikeda-02.frag b/10/ikeda-02.frag deleted file mode 100644 index 1c94555..0000000 --- a/10/ikeda-02.frag +++ /dev/null @@ -1,40 +0,0 @@ -// Author @patriciogv - 2015 -// Title: DeFrag - -#ifdef GL_ES -precision mediump float; -#endif - -uniform vec2 u_resolution; -uniform vec2 u_mouse; -uniform float u_time; - -float random (in float x) { return fract(sin(x)*1e4); } -float random (in vec2 _st) { return fract(sin(dot(_st.xy, vec2(12.9898,78.233)))* 43758.5453123);} - -void main() { - vec2 st = gl_FragCoord.xy/u_resolution.xy; - st.x *= u_resolution.x/u_resolution.y; - - st *= vec2(100.0,50.); - - vec2 ipos = floor(st); // integer - vec2 fpos = fract(st); // fraction - - vec2 vel = floor(vec2(u_time*10.)); // time - vel *= vec2(-1.,0.); // direction - - vel *= (step(1., mod(ipos.y,2.0))-0.5)*2.; // Oposite directions - vel *= random(ipos.y); // random speed - - // Move - ipos += floor(vel); - // Assign a random value base on the integer coord - - float pct = 1.0; - pct *= random(ipos); - pct *= step(.1,fpos.x)*step(.1,fpos.y); // margin - pct = step(0.001+u_mouse.x/u_resolution.x,pct); // threshold - - gl_FragColor = vec4(vec3(pct),1.0); -} diff --git a/10/ikeda-02.png b/10/ikeda-02.png deleted file mode 100644 index fb1445a..0000000 Binary files a/10/ikeda-02.png and /dev/null differ diff --git a/10/ikeda-03.frag b/10/ikeda-03.frag index b8d2d31..db5c659 100644 --- a/10/ikeda-03.frag +++ b/10/ikeda-03.frag @@ -5,6 +5,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + uniform vec2 u_resolution; uniform vec2 u_mouse; uniform float u_time; diff --git a/10/ikeda-04.frag b/10/ikeda-04.frag index a88fdba..d82ca37 100644 --- a/10/ikeda-04.frag +++ b/10/ikeda-04.frag @@ -5,6 +5,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + uniform vec2 u_resolution; uniform vec2 u_mouse; uniform float u_time; diff --git a/10/ikeda-digits.frag b/10/ikeda-digits.frag index f20b824..1d9a584 100644 --- a/10/ikeda-digits.frag +++ b/10/ikeda-digits.frag @@ -5,6 +5,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + uniform vec2 u_resolution; uniform float u_time; diff --git a/10/ikeda-numered-grid.frag b/10/ikeda-numered-grid.frag index d53635f..a8bd604 100644 --- a/10/ikeda-numered-grid.frag +++ b/10/ikeda-numered-grid.frag @@ -5,6 +5,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + uniform vec2 u_resolution; uniform float u_time; diff --git a/10/ikeda-simple-grid.frag b/10/ikeda-simple-grid.frag index 8bf293b..37dc5ad 100644 --- a/10/ikeda-simple-grid.frag +++ b/10/ikeda-simple-grid.frag @@ -5,6 +5,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + uniform vec2 u_resolution; uniform float u_time; diff --git a/10/matrix.frag b/10/matrix.frag index 248872e..549fa11 100644 --- a/10/matrix.frag +++ b/10/matrix.frag @@ -5,6 +5,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + uniform vec2 u_resolution; uniform float u_time; diff --git a/10/tmp/animated.gif b/10/tmp/animated.gif deleted file mode 100644 index 89c8ed7..0000000 Binary files a/10/tmp/animated.gif and /dev/null differ diff --git a/10/tmp/animated.png b/10/tmp/animated.png deleted file mode 100644 index 69f0629..0000000 Binary files a/10/tmp/animated.png and /dev/null differ diff --git a/10/tmp/glitch.sh b/10/tmp/glitch.sh deleted file mode 100755 index df454f6..0000000 --- a/10/tmp/glitch.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -SHADER=$1 -SEC=$1 - -COUNTER=0 -for i in `seq -w 0.01 .031 $SEC`; do - echo $i - `glslViewer $SHADER -s $i -o frame-$COUNTER.png` - let COUNTER=COUNTER+1 -done - -convert -delay 3.5 -loop 1 frame-*.png animated.gif diff --git a/10/tmp/ikeda-01.frag b/10/tmp/ikeda-01.frag deleted file mode 100644 index 388eee0..0000000 --- a/10/tmp/ikeda-01.frag +++ /dev/null @@ -1,42 +0,0 @@ -// Author @patriciogv - 2015 -// http://patriciogonzalezvivo.com - -#ifdef GL_ES -precision mediump float; -#endif - -uniform vec2 u_resolution; -uniform vec2 u_mouse; -uniform float u_time; - -float random (in float x) { return fract(sin(x)*1e4); } -float noise (in float x) { - float i = floor(x); - float f = fract(x); - float u = f * f * (3.0 - 2.0 * f); - return mix(random(i), random(i + 1.0), u); -} - -void main() { - vec2 st = gl_FragCoord.xy/u_resolution.xy; - st.x *= u_resolution.x/u_resolution.y; - - vec3 color = vec3(0.0); - - vec2 grid = vec2(20.0,2.0); - - float t = u_time*max(grid.x,grid.y)*.5; - - vec2 ipos = floor(st*grid); - vec2 fpos = fract(st*grid); - - float offset = ipos.x+floor(t); - float value = pow(noise(offset*0.2),2.)+noise(offset*0.9)*.5; - - if (mod(ipos.y,2.) == 0.) { - fpos.y = 1.0-fpos.y; - } - color += step(fpos.y*1.5,value)*step(.5,fpos.x); - - gl_FragColor = vec4(color,1.0); -} diff --git a/10/tmp/ikeda-03.frag b/10/tmp/ikeda-03.frag deleted file mode 100644 index 71433d9..0000000 --- a/10/tmp/ikeda-03.frag +++ /dev/null @@ -1,49 +0,0 @@ -// Author @patriciogv - 2015 -// http://patriciogonzalezvivo.com - -#ifdef GL_ES -precision mediump float; -#endif - -uniform vec2 u_resolution; -uniform vec2 u_mouse; -uniform float u_time; - -float random (in float x) { return fract(sin(x)*1e4);} -float random (in vec2 st) { return fract(1e4 * sin(17.0 * st.x + st.y * 0.1) * (0.1 + abs(sin(st.y * 13.0 + st.x)))); } - -float pattern(vec2 st, vec2 v, float t) { - vec2 p = floor(st+v); - return step(t, random(100.+p*.000001)+random(p.x)*0.5 ); -} - -void main() { - vec2 st = gl_FragCoord.xy/u_resolution.xy; - if (u_resolution.x>u_resolution.y) { - st.x *= u_resolution.x/u_resolution.y; - } else { - st.y *= u_resolution.y/u_resolution.x; - } - vec2 grid = vec2(100.0,50.); - st *= grid; - - vec2 ipos = floor(st); // integer - vec2 fpos = fract(st); // fraction - - vec2 vel = vec2(u_time*2.*max(grid.x,grid.y)); // time - vel *= vec2(-1.,0.0) * random(1.0+ipos.y); // direction - - // Assign a random value base on the integer coord - vec2 offset = vec2(0.3,0.); - float pct = 0.5;//u_mouse.x/u_resolution.x; - - vec3 color = vec3(0.); - color.r = pattern(st+offset,vel,0.5+pct); - color.g = pattern(st,vel,0.5+pct); - color.b = pattern(st-offset,vel,0.5+pct); - - // Margins - color *= step(0.2,fpos.y); - - gl_FragColor = vec4(color,1.0); -} diff --git a/10/tmp/ikeda-04.frag b/10/tmp/ikeda-04.frag deleted file mode 100644 index 480311c..0000000 --- a/10/tmp/ikeda-04.frag +++ /dev/null @@ -1,55 +0,0 @@ -// Author @patriciogv - 2015 -// http://patriciogonzalezvivo.com - -#ifdef GL_ES -precision mediump float; -#endif - -uniform vec2 u_resolution; -uniform vec2 u_mouse; -uniform float u_time; - -float random (in float x) { return fract(sin(x)*1e4); } -float random (in vec2 _st) { return fract(sin(dot(_st.xy, vec2(12.9898,78.233)))* 43758.5453123);} - -void main() { - vec2 st = gl_FragCoord.xy/u_resolution.xy; - st.x *= u_resolution.x/u_resolution.y; - - // Grid - vec2 grid = vec2(100.0,50.); - st *= grid; - - vec2 ipos = floor(st); // integer - - vec2 vel = floor(vec2(u_time*10.)); // time - vel *= vec2(-1.,0.); // direction - - vel *= (step(1., mod(ipos.y,2.0))-0.5)*2.; // Oposite directions - vel *= random(ipos.y); // random speed - - // 100% - float totalCells = grid.x*grid.y; - float t = mod(u_time*max(grid.x,grid.y)+floor(1.0+u_time*u_mouse.y),totalCells); - vec2 head = vec2(mod(t,grid.x), floor(t/grid.x)); - - vec2 offset = vec2(0.1,0.); - - vec3 color = vec3(1.0); - color *= step(grid.y-head.y,ipos.y); // Y - color += (1.0-step(head.x,ipos.x))*step(grid.y-head.y,ipos.y+1.); // X - color = clamp(color,vec3(0.),vec3(1.)); - - // Assign a random value base on the integer coord - color.r *= random(floor(st+vel+offset)); - color.g *= random(floor(st+vel)); - color.b *= random(floor(st+vel-offset)); - - color = smoothstep(0.,.5+u_mouse.x/u_resolution.x*.5,color*color); // smooth - color = step(0.5+u_mouse.x/u_resolution.x*0.5,color); // threshold - - // Margin - color *= step(.1,fract(st.x+vel.x))*step(.1,fract(st.y+vel.y)); - - gl_FragColor = vec4(color,1.0); -} diff --git a/10/tmp/img-glitch.frag b/10/tmp/img-glitch.frag deleted file mode 100644 index 7fa1bdd..0000000 --- a/10/tmp/img-glitch.frag +++ /dev/null @@ -1,71 +0,0 @@ -// Author @patriciogv - 2015 -// http://patriciogonzalezvivo.com - -#ifdef GL_ES -precision mediump float; -#endif - -uniform sampler2D u_tex; -uniform vec2 u_resolution; -uniform float u_time; - -float random(in float x){ return fract(sin(x)*43758.5453); } -float random(in vec2 st){ return fract(sin(dot(st.xy ,vec2(12.9898,78.233))) * 43758.5453); } - -float noise(in vec2 x) { - vec2 i = floor(x); - vec2 f = fract(x); - - float a = random(i); - float b = random(i + vec2(1.0, 0.0)); - float c = random(i + vec2(0.0, 1.0)); - float d = random(i + vec2(1.0, 1.0)); - - vec2 u = f * f * (3.0 - 2.0 * f); - return mix(a, b, u.x) + (c - a) * u.y * (1.0 - u.x) + (d - b) * u.x * u.y; -} - -float fbm( in vec2 p ){ - float s = 0.0; - float m = 0.0; - float a = 0.5; - for(int i=0; i<2; i++ ){ - s += a * noise(p); - m += a; - a *= 0.5; - p *= 2.0; - } - return s/m; -} - -void main(){ - vec2 st = gl_FragCoord.st/u_resolution.xy; - float aspect = u_resolution.x/u_resolution.y; - - vec2 grain_st = st-.5; - float grain = 0.0; - grain = mix(1., 0.9, dot(grain_st,grain_st) + (fbm(gl_FragCoord.xy*0.6)*0.1) ); - - // Random blocks - vec2 blocks_st = floor(st*vec2(5.*random(floor(u_time*10.)),10.*(1.+random(floor(u_time*3.))) )); - float t = u_time*2.+random(blocks_st); - float time_i = floor(t); - float time_f = fract(t); - float block = step(0.9,random(blocks_st+time_i))*(1.0-time_f); - vec2 offset = vec2(block*0.01,block*0.005)+(1.0-grain)*.08; - - vec4 color = vec4(1.); - color.r = texture2D(u_tex,st+offset).r; - color.g = texture2D(u_tex,st).r; - color.b = texture2D(u_tex,st-offset).r; - - color.a = max(texture2D(u_tex,st+offset).a,max(texture2D(u_tex,st).a, texture2D(u_tex,st-offset).a)); - - if (block > .5) { - color.rgb = abs(block*grain-color.rgb); - } - - color.rgb *= 0.4+sin((st.y*3.1415+u_time)*500.); - - gl_FragColor = color; -} diff --git a/10/tmp/matrix.frag b/10/tmp/matrix.frag deleted file mode 100644 index b93d2dd..0000000 --- a/10/tmp/matrix.frag +++ /dev/null @@ -1,48 +0,0 @@ -// Author @patriciogv - 2015 -// http://patriciogonzalezvivo.com - -#ifdef GL_ES -precision mediump float; -#endif - -uniform vec2 u_resolution; -uniform float u_time; - -float random(in float x){ return fract(sin(x)*43758.5453); } -float random(in vec2 st){ return fract(sin(dot(st.xy ,vec2(12.9898,78.233))) * 43758.5453); } - -float randomChar(vec2 outer,vec2 inner){ - float grid = 5.; - vec2 margin = vec2(.2,.05); - vec2 borders = step(margin,inner)*step(margin,1.-inner); - vec2 ipos = floor(inner*grid); - vec2 fpos = fract(inner*grid); - return step(.5,random(outer*64.+ipos)) * borders.x * borders.y * step(0.01,fpos.x) * step(0.01,fpos.y); -} - -void main(){ - vec2 st = gl_FragCoord.st/u_resolution.xy; - if (u_resolution.x > u_resolution.y) { - st.x *= u_resolution.x/u_resolution.y; - } else { - st.y *= u_resolution.y/u_resolution.y; - } - vec3 color = vec3(0.0); - - float rows = 1.0; - // rows = 3.0; - rows = 12.0; - //rows = 24.0; - vec2 ipos = floor(st*rows); - vec2 fpos = fract(st*rows); - - ipos += vec2(0.,floor(u_time*20.*random(ipos.x+1.))); - - float pct = 1.0; - pct *= randomChar(ipos,fpos); - // pct *= random(ipos); - - color = vec3(pct); - - gl_FragColor = vec4( color , 1.0); -} diff --git a/10/tmp/numered-grid.frag b/10/tmp/numered-grid.frag deleted file mode 100644 index d64cdd7..0000000 --- a/10/tmp/numered-grid.frag +++ /dev/null @@ -1,178 +0,0 @@ -// Author @patriciogv - 2015 -// http://patriciogonzalezvivo.com - -#ifdef GL_ES -precision mediump float; -#endif - -uniform vec2 u_resolution; -uniform float u_time; - -float random(in float x){ return fract(sin(x)*43758.5453); } -float random(in vec2 st){ return fract(sin(dot(st.xy ,vec2(12.9898,78.233))) * 43758.5453); } - -float noise(in vec2 x) { - vec2 i = floor(x); - vec2 f = fract(x); - - float a = random(i); - float b = random(i + vec2(1.0, 0.0)); - float c = random(i + vec2(0.0, 1.0)); - float d = random(i + vec2(1.0, 1.0)); - - vec2 u = f * f * (3.0 - 2.0 * f); - return mix(a, b, u.x) + (c - a) * u.y * (1.0 - u.x) + (d - b) * u.x * u.y; -} - -float fbm( in vec2 p ){ - float s = 0.0; - float m = 0.0; - float a = 0.5; - for(int i=0; i<2; i++ ){ - s += a * noise(p); - m += a; - a *= 0.5; - p *= 2.0; - } - return s/m; -} - -float bin(vec2 ipos, float n){ - float remain = mod(n,33554432.); - for(float i = 0.0; i < 25.0; i++){ - if ( floor(i/3.) == ipos.y && mod(i,3.) == ipos.x ) { - return step(1.0,mod(remain,2.)); - } - remain = ceil(remain/2.); - } - return 0.0; -} - -float char(vec2 st, float n){ - st.x = st.x*2.-0.5; - st.y = st.y*1.2-0.1; - - vec2 grid = vec2(3.,5.); - - vec2 ipos = floor(st*grid); - vec2 fpos = fract(st*grid); - - n = floor(mod(n,10.)); - float digit = 0.0; - if (n < 1. ) { digit = 31600.; } - else if (n < 2. ) { digit = 9363.0; } - else if (n < 3. ) { digit = 31184.0; } - else if (n < 4. ) { digit = 31208.0; } - else if (n < 5. ) { digit = 23525.0; } - else if (n < 6. ) { digit = 29672.0; } - else if (n < 7. ) { digit = 29680.0; } - else if (n < 8. ) { digit = 31013.0; } - else if (n < 9. ) { digit = 31728.0; } - else if (n < 10. ) { digit = 31717.0; } - float pct = bin(ipos, digit); - - vec2 borders = vec2(1.); - // borders *= step(0.01,fpos.x) * step(0.01,fpos.y); // inner - borders *= step(0.0,st)*step(0.0,1.-st); // outer - - return step(.5,1.0-pct) * borders.x * borders.y; -} - -float grid(vec2 st, float res) { - vec2 grid = fract(st*res); - return 1.-(step(res,grid.x) * step(res,grid.y)); -} - -float superGrid(vec2 st) { - return 1.*grid(st,0.01) + - 0.5*grid(st,0.02) + - 0.6*grid(st,0.1); -} - -float box(in vec2 st, in vec2 size){ - size = vec2(0.5) - size*0.5; - vec2 uv = smoothstep(size, - size+vec2(0.001), - st); - uv *= smoothstep(size, - size+vec2(0.001), - vec2(1.0)-st); - return uv.x*uv.y; -} - -float cross(in vec2 st, vec2 size){ - return clamp(box(st, vec2(size.x*0.5,size.y*0.125)) + - box(st, vec2(size.y*0.125,size.x*0.5)),0.,1.); -} - -void main(){ - vec2 st = gl_FragCoord.st/u_resolution.xy; - float aspect = u_resolution.x/u_resolution.y; - - vec2 grain_st = st-.5; - vec3 color = vec3(0.0); - float grain = 0.0; - grain = mix(1., 0.8, dot(grain_st,grain_st) + (fbm(gl_FragCoord.xy*0.6)*0.1) ); - - // Fix Aspect ration - st -= .5; - st.x *= aspect; - - // Zoom - st *= 2.8; - - // Random blocks - vec2 blocks_st = floor((st-.25)*6.); - float t = u_time*.3+random(blocks_st); - float time_i = floor(t); - float time_f = fract(t); - float block = step(0.9,random(blocks_st+time_i))*(1.0-time_f); - vec2 offset = vec2(block*0.02,block*0.001)+(1.0-grain)*.08; - - // Grid - vec2 grid_st = st*300.; - - vec3 grid_chroma = vec3(0.0); - grid_chroma.r = superGrid(grid_st+offset*100.); - grid_chroma.g = superGrid(grid_st); - grid_chroma.b = superGrid(grid_st-offset*100.); - color += vec3(0.1,0.08,0.08)*grid_chroma; - - // Crosses - vec2 crosses_st = st + .5; - crosses_st *= 3.; - vec2 crosses_st_f = fract(crosses_st); - color *= 1.-cross(crosses_st_f,vec2(.2,.2)); - - vec3 cross_chroma = vec3(0.0); - cross_chroma.r = cross(crosses_st_f+offset,vec2(.15,.15)); - cross_chroma.g = cross(crosses_st_f,vec2(.15,.15)); - cross_chroma.b = cross(crosses_st_f-offset,vec2(.15,.15)); - color += vec3(.7)*cross_chroma; - - // Digits - vec2 digits_st = mod(st*60.,20.); - vec2 digits_st_i = floor(digits_st); - float digits_n = ceil(block*5.); - offset *= 10.; - if (block > 0.0 && - digits_st_i.y == 1. && - digits_st_i.x > 0. && digits_st_i.x < digits_n ) { - vec2 digits_st_f = fract(digits_st); - float pct = random(digits_st_i+floor(crosses_st)+floor(u_time*20.)); - - color.r += block*char(digits_st_f+offset,100.*pct); - color.g += block*char(digits_st_f,100.*pct); - color.b += block*char(digits_st_f-offset,100.*pct); - } else if ( block > 0.0 && - digits_st_i.y == 2. && - digits_st_i.x > 0. && digits_st_i.x < digits_n ) { - vec2 digits_st_f = fract(digits_st); - float pct = random(digits_st_i+floor(crosses_st)+floor(u_time*20.)); - - color.r += block*char(digits_st_f+offset,100.*pct); - color.g += block*char(digits_st_f,100.*pct); - color.b += block*char(digits_st_f-offset,100.*pct); - } - gl_FragColor = vec4( (1.0-color) * grain, 1.0); -} diff --git a/11/iching-03.frag b/11/iching-03.frag index e8bfbee..5109fe4 100644 --- a/11/iching-03.frag +++ b/11/iching-03.frag @@ -4,6 +4,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + #define PI 3.14159265359 #define TWO_PI 6.28318530718 diff --git a/15/texture-kaleidoscope.frag b/15/texture-kaleidoscope.frag index 28a829a..be93b1d 100644 --- a/15/texture-kaleidoscope.frag +++ b/15/texture-kaleidoscope.frag @@ -5,6 +5,18 @@ precision mediump float; #endif +// Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +// I am the sole copyright owner of this Work. +// +// You cannot host, display, distribute or share this Work in any form, +// including physical and digital. You cannot use this Work in any +// commercial or non-commercial product, website or project. You cannot +// sell this Work and you cannot mint an NFTs of it. +// I share this Work for educational purposes, and you can link to it, +// through an URL, proper attribution and unmodified screenshot, as part +// of your educational material. If these conditions are too restrictive +// please contact me and we'll definitely work it out. + #define PI 3.14159265359 #define TWO_PI 6.28318530718 diff --git a/LICENSE b/LICENSE index fc7074d..e2f0194 100644 --- a/LICENSE +++ b/LICENSE @@ -1,2 +1,13 @@ -Copyright (c) 2015 Patricio Gonzalez Vivo -All rights reserved. \ No newline at end of file +Copyright (c) 2015 Patricio Gonzalez Vivo - http://patriciogonzalezvivo.com/ +All rights reserved. + +I am the sole copyright owner of this Work. + +You cannot host, display, distribute or share this Work in any form, +including physical and digital. You cannot use this Work in any +commercial or non-commercial product, website or project. You cannot +sell this Work and you cannot mint an NFTs of it. +I share this Work for educational purposes, and you can link to it, +through an URL, proper attribution and unmodified screenshot, as part +of your educational material. If these conditions are too restrictive +please contact me and we'll definitely work it out. \ No newline at end of file diff --git a/README.md b/README.md index 4a93b9a..2dc162e 100644 --- a/README.md +++ b/README.md @@ -111,3 +111,9 @@ Thanks to everyone who has believed in this project and [contributed with fixes] Sign up for the news letter or [follow it on Twitter](https://twitter.com/bookofshaders)

+ + +## LICENSE + +Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/ +All rights reserved. \ No newline at end of file