fixing licenses

pull/362/head
Patricio Gonzalez Vivo 3 years ago
parent d76550f41b
commit 67cdcf2af6

@ -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;

@ -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 );
}

@ -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 );
}

@ -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);
}

@ -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 );
}

@ -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 );
}

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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

@ -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;

@ -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;

@ -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;

@ -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

@ -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);
}

@ -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);
}

@ -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);
}

@ -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);
}

@ -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);
}

@ -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);
}

@ -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);
}

@ -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);
}

@ -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);
}

@ -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);
}

@ -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);
}

@ -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);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

@ -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);
}

@ -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;

@ -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

@ -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;

@ -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);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

@ -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);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 B

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 807 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

@ -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

@ -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);
}

@ -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);
}

@ -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);
}

@ -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;
}

@ -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);
}

@ -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);
}

@ -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

@ -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

@ -1,2 +1,13 @@
Copyright (c) 2015 Patricio Gonzalez Vivo
All rights reserved.
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.

@ -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)
<form style="border:1px solid #ccc;padding:3px;text-align:center;" action="https://tinyletter.com/thebookofshaders" method="post" target="popupwindow" onsubmit="window.open('https://tinyletter.com/thebookofshaders', 'popupwindow', 'scrollbars=yes,width=800,height=600');return true"><a href="https://tinyletter.com/thebookofshaders"><p><label for="tlemail">Enter your email address</label></p></a><p><input type="text" style="width:140px" name="email" id="tlemail" /></p><input type="hidden" value="1" name="embed"/><input type="submit" value="Subscribe" /><p><a href="https://tinyletter.com" target="_blank"></a></p></form>
## LICENSE
Copyright (c) Patricio Gonzalez Vivo, 2015 - http://patriciogonzalezvivo.com/
All rights reserved.
Loading…
Cancel
Save