| 1 |
// Taken from https://www.shadertoy.com/view/lsfGzr |
| 2 |
// Blobs by @paulofalcao |
| 3 |
|
| 4 |
#define time iTime |
| 5 |
|
| 6 |
float makePoint(float x,float y,float fx,float fy,float sx,float sy,float t){ |
| 7 |
float xx=x+sin(t*fx)*sx; |
| 8 |
float yy=y+cos(t*fy)*sy; |
| 9 |
return 1.0/sqrt(xx*xx+yy*yy); |
| 10 |
} |
| 11 |
|
| 12 |
void mainImage( out vec4 fragColor, in vec2 fragCoord ) { |
| 13 |
|
| 14 |
vec2 p=(fragCoord.xy/iResolution.x)*2.0-vec2(1.0,iResolution.y/iResolution.x); |
| 15 |
|
| 16 |
p=p*2.0; |
| 17 |
|
| 18 |
float x=p.x; |
| 19 |
float y=p.y; |
| 20 |
|
| 21 |
float a= |
| 22 |
makePoint(x,y,3.3,2.9,0.3,0.3,time); |
| 23 |
a=a+makePoint(x,y,1.9,2.0,0.4,0.4,time); |
| 24 |
a=a+makePoint(x,y,0.8,0.7,0.4,0.5,time); |
| 25 |
a=a+makePoint(x,y,2.3,0.1,0.6,0.3,time); |
| 26 |
a=a+makePoint(x,y,0.8,1.7,0.5,0.4,time); |
| 27 |
a=a+makePoint(x,y,0.3,1.0,0.4,0.4,time); |
| 28 |
a=a+makePoint(x,y,1.4,1.7,0.4,0.5,time); |
| 29 |
a=a+makePoint(x,y,1.3,2.1,0.6,0.3,time); |
| 30 |
a=a+makePoint(x,y,1.8,1.7,0.5,0.4,time); |
| 31 |
|
| 32 |
float b= |
| 33 |
makePoint(x,y,1.2,1.9,0.3,0.3,time); |
| 34 |
b=b+makePoint(x,y,0.7,2.7,0.4,0.4,time); |
| 35 |
b=b+makePoint(x,y,1.4,0.6,0.4,0.5,time); |
| 36 |
b=b+makePoint(x,y,2.6,0.4,0.6,0.3,time); |
| 37 |
b=b+makePoint(x,y,0.7,1.4,0.5,0.4,time); |
| 38 |
b=b+makePoint(x,y,0.7,1.7,0.4,0.4,time); |
| 39 |
b=b+makePoint(x,y,0.8,0.5,0.4,0.5,time); |
| 40 |
b=b+makePoint(x,y,1.4,0.9,0.6,0.3,time); |
| 41 |
b=b+makePoint(x,y,0.7,1.3,0.5,0.4,time); |
| 42 |
|
| 43 |
float c= |
| 44 |
makePoint(x,y,3.7,0.3,0.3,0.3,time); |
| 45 |
c=c+makePoint(x,y,1.9,1.3,0.4,0.4,time); |
| 46 |
c=c+makePoint(x,y,0.8,0.9,0.4,0.5,time); |
| 47 |
c=c+makePoint(x,y,1.2,1.7,0.6,0.3,time); |
| 48 |
c=c+makePoint(x,y,0.3,0.6,0.5,0.4,time); |
| 49 |
c=c+makePoint(x,y,0.3,0.3,0.4,0.4,time); |
| 50 |
c=c+makePoint(x,y,1.4,0.8,0.4,0.5,time); |
| 51 |
c=c+makePoint(x,y,0.2,0.6,0.6,0.3,time); |
| 52 |
c=c+makePoint(x,y,1.3,0.5,0.5,0.4,time); |
| 53 |
|
| 54 |
vec3 d=vec3(a,b,c)/32.0; |
| 55 |
|
| 56 |
fragColor = vec4(d.x,d.y,d.z,1.0); |
| 57 |
} |