Deck.transition('daybreak',{dur:1.2,frag:`void main(){ float e=vUv.y*.7+vUv.x*.3, t=p*1.3-.15; float m=1.-smoothstep(t-.1,t,e); float g=exp(-abs(e-t+.05)*12.)*sin(p*3.14159); o=vec4(mix(texture(tA,vUv).rgb,texture(tB,vUv).rgb,m)+vec3(1.,.6,.25)*1.5*g,1.); }`}); Deck.scene({ id:'selectall', title:'Select all', enterWith:'daybreak', post:{bloom:1.1,threshold:.9,vignette:.3,grain:.035}, beats:[{dur:4,hold:4},{dur:4,hold:5},{dur:5,hold:5}], notes:[ 'Up to now it has only been editing screens. Then it gets hands: robots, factories, factories that build factories. Farming economies doubled about every thousand years. Ours doubles about every twenty.', 'Once machines build the machines, the doubling time falls to a year, then to a month. That is not a new law of physics. It is what any copying process does when nothing holds it back. This part is my speculation, not a published forecast.', 'And there is a great deal of room. Everything our civilisation uses is about one part in twenty trillion of what the Sun puts out. So: select all.' ], setup(d){ return { sc:d.pass(`uniform vec2 uC,uM; uniform float uR,uSun,uSunR,uPan,uAll,uShell,uBig; float cityf(vec2 ll){ float land=smoothstep(.42,.5,fbm(ll*vec2(1.2,1.8)+3.)); return land*smoothstep(.38,.62,fbm(ll*5.+9.)); } void main(){ vec2 p=(vUv-.5)*vec2(uRes.x/uRes.y,1.)+uM*.008; vec2 s=p*140.; float st=hash12(floor(s)); vec3 bg=vec3(.002,.003,.006)+vec3(.6,.7,1.)*step(.985,st)*smoothstep(.3,0.,length(fract(s)-.5))*.7; vec2 q=(p-uC)/uR; float r=length(q); vec3 pcol; if(r>=1.){ pcol=bg+vec3(.25,.5,1.)*.9*exp(-(r-1.)*45.)*(.3+.7*sat(q.y*.8+.6)); } else { float z=sqrt(1.-r*r); vec3 n=vec3(q,z); n.xz=rot2(uTime*.01)*n.xz; vec2 ll=vec2(atan(n.x,n.z),asin(clamp(n.y,-1.,1.))); float land=smoothstep(.42,.5,fbm(ll*vec2(1.2,1.8)+3.)); float city=cityf(ll); vec2 g=ll*60.; float dots=step(.65,hash12(floor(g)))*smoothstep(.45,.1,length(fract(g)-.5)); vec3 lights=vec3(1.,.5,.12)*(city*dots*3.5+city*.55); lights+=vec3(1.,.45,.1)*.25*smoothstep(.2,.7,fbm(ll*3.+20.))*land; vec2 g2=ll/vec2(.12083,.07); vec2 id=floor(g2), f=fract(g2)-.5; float h=hash12(id); float ok=step(.5,mix(sat(city*3.),1.,uAll)); float on=smoothstep(h,h+.05,uPan)*ok; float pm=smoothstep(.04,-.02,sdBox(f,vec2(.4,.36)))*on; vec2 cs=vec2(.2417,.136); vec2 g3=ll/cs; vec2 id3=floor(g3), f3=fract(g3)-.5; float h3=hash12(id3+11.); float cc=cityf((id3+.5)*cs); float ok3=step(.12,cc)*step(.3,h3); float on3=smoothstep(h3*.8,h3*.8+.25,uBig)*ok3; float bm=smoothstep(.05,-.02,sdBox(f3,vec2(.42,.4)))*on3; float glow=exp(-max(sdBox(f3,vec2(.42,.4)),0.)*10.)*on3*.35; float edge=smoothstep(.0,.06,-sdBox(f3,vec2(.42,.4))); vec3 bpan=vec3(1.,1.05,1.15)*(1.1+.5*hash12(id3+2.))*(.75+.25*edge); vec3 pan=vec3(1.,1.05,1.15)*1.4*(.8+.4*hash12(id+3.)); vec3 pc=vec3(.006,.01,.022)+land*vec3(.006,.005,.004)+lights*(.5+.5*z); pc+=pan*pm*(.5+.5*z)+bpan*bm*(.6+.4*z)+vec3(.5,.6,.9)*glow*(.5+.5*z); pc+=vec3(.1,.25,.6)*pow(1.-z,4.)*.5; pcol=pc; } vec2 sq=p-uC; float dd=length(sq); float a=atan(sq.y,sq.x); float sr=uSunR; vec3 sc=vec3(1.,.75,.4)*8.*smoothstep(sr*1.02,sr*.98,dd); float out_=step(sr,dd); sc+=vec3(1.,.55,.2)*.6*exp(-max(dd-sr,0.)*8.)*out_; float ry=fbm(vec2(cos(a),sin(a))*3.+uTime*.02); float rays=smoothstep(.35,.8,ry)*exp(-max(dd-sr,0.)*2.5)*1.2*out_*(1.+uShell*1.5); // one coherent shell: concentric tile bands, clean cells, gaps float rr=(dd/sr-1.4)/.9; float tmA=0.; vec3 tc=vec3(0.); if(uShell>0.&&rr>0.&&rr<1.){ float u=a/6.28318*40.+.5; float row=rr*4.; vec2 tid=vec2(floor(u),floor(row)); vec2 tf=vec2(fract(u)-.5,fract(row)-.5); float th=hash12(tid); float built=smoothstep(th*.7,th*.7+.3,uShell)*step(.25,hash12(tid+3.)); float aa=.04; tmA=smoothstep(aa,-aa,sdBox(tf,vec2(.38)))*built; tc=mix(vec3(.38,.04,.04),vec3(1.,.92,.88),step(.5,hash12(tid+5.)))*(.7+.4*(.5-tf.y)); } sc+=vec3(1.,.7,.4)*rays*(1.-tmA*.9); sc=mix(sc,tc,tmA); vec3 col=mix(bg+sc,pcol,1.-uSun); col*=mix(.2,1.,smoothstep(-.8,.1,p.x)); float tx=smoothstep(.1,-.45,p.x)*smoothstep(-.1,.3,p.y); col*=1.-.8*tx*(.4+.6*uSun)*(1.-.5*(1.-uSun)); col*=1.-.55*smoothstep(-.1,-.7,p.x)*uSun; o=vec4(col,1.); }`,'selectall scene') } }, draw(s,d,r){ const E=d.E, L=E.lin; const k1=s.k(1,0,4,E.io3), k3=s.k(2,0,3,E.io3); const cx=(.38+.1*k1)+.03*k3, cy=-1.05*(1-k1)-.08*(1-k1); const R=(1.3-.9*k1)*(1-.5*k3); const pan=.5*s.k(1,.5,4); const sunR=.06+.09*s.k(2,0,3,E.out3); r.sc.draw({uC:[cx,cy],uM:[s.mouse.x,s.mouse.y],uR:R,uSun:s.k(2,0,2.4),uSunR:sunR,uPan:pan,uAll:s.k(1,0,3.5),uShell:s.k(2,.8,4.5),uBig:s.k(0,.4,3.6)}); const mx=(d.view.x0+d.view.x1)/2, X=mx+cx*1080, Y=540-cy*1080; const pa=s.k(1,2.5,3.3,L)*(1-s.k(2,0,.8,L)); if(pa>0){ const h=R*1080+30; d.select(X-h,Y-h,2*h,2*h,{a:pa,rot:.12}); } const sa=s.k(2,1.8,2.6,L); if(sa>0){ const h=sunR*2.3*1080+40; d.select(X-h,Y-h,2*h,2*h,{a:sa,rot:.03}); } const c='#f6eddc'; d.text('Farming economies doubled\nevery thousand years.\nOurs, every twenty.',{x:150,y:150,size:72,font:'display',color:c,show:s.k(0,.3,1.8,L),hide:s.k(1,0,.7,L)}); d.text('Then every year.\nThen every month.',{x:150,y:150,size:96,font:'display',color:c,show:s.k(1,.9,2.2,L),hide:s.k(2,0,.7,L)}); d.text('illustration',{x:150,y:430,size:30,font:'mono',color:'#cfd3da',style:'fade',show:s.k(1,1.6,2.6,L),hide:s.k(2,0,.5,L)}); d.text('Select all.',{x:150,y:150,size:150,font:'display',color:c,show:s.k(2,1,2.4,L)}); } });