Deck.transition('fold',{dur:1.3,frag:`void main(){ float f=sat(p*1.4), g=sat((p-.45)/.4), h=sat((p-.8)/.2); float fs=f*f*(3.-2.*f); float sc=mix(1.,.42,fs); float cy=.5+.1*g-.3*h*h; vec2 q=(vUv-vec2(.5,cy))/sc; float hw=.5; if(q.y<0.) hw=.5-g*.32*sat(-q.y*2.); else hw=.5*(1.-g*.95*sat(q.y*2.)); hw=max(hw,.004); vec2 ua=vec2(q.x/(hw*2.)+.5,q.y+.5); vec3 paper=texture(tA,clamp(ua,0.,1.)).rgb; float crease=smoothstep(.012,0.,abs(q.x))+smoothstep(.01,0.,abs(q.y))*.7; paper*=1.-.3*g*crease; paper*=1.-.22*sin(f*3.14159)*step(q.x,0.); paper=mix(paper,vec3(.86,.86,.84),.55*g); float m=smoothstep(0.,.004,hw-abs(q.x)+.01)*step(abs(q.y),.5+.002); vec2 ub=vUv+vec2(0.,.004)*sin(length(vUv-vec2(.5,.35))*60.-p*30.)*h*(1.-h); vec3 nb=texture(tB,ub).rgb; vec3 col=mix(nb,paper,m); float w=smoothstep(.75,1.,p); o=vec4(mix(col,texture(tB,vUv).rgb,w),1.); }`}); Deck.scene({ id:'boat', title:'Anchor', enterWith:'fold', post:{bloom:.8,threshold:1,vignette:.3,grain:.03,exposure:1,tone:'aces'}, beats:[{dur:2,hold:4},{dur:4.2,hold:5},{dur:3.5,hold:4}], notes:[ 'This is how most of us forecast. We look at today, and we assume tomorrow will be about the same. Calm sea, small boat.', 'Psychologists call it anchoring. The sea is AI progress, and it keeps rising. The chain is exactly as long as it was when we first made up our minds, so it pulls us under.', 'You cannot make the chain longer fast enough. You can only let go of it.' ], setup(d){ return { sea:d.pass(`uniform float uLvl,uUnder,uGold,uAmp,uTaut,uVis; float wl(float x){ return uLvl+uAmp*(sin(x*4.+uTime*.7)+.5*sin(x*9.-uTime*.5)+.25*sin(x*17.+uTime)); } void main(){ vec2 p=(vUv-.5)*vec2(uRes.x/uRes.y,1.); float W=wl(p.x); float dy=W-p.y; vec2 sunp=vec2(.12,uLvl+.07); vec3 hc=mix(vec3(.22,.24,.27),vec3(1.,.5,.2),uGold); vec3 tc=mix(vec3(.04,.05,.07),vec3(.1,.17,.38),uGold); vec3 sky=mix(hc,tc,pow(sat((p.y-W)*1.6),.6)); float sd=length(p-sunp); float cl=fbm(vec2(p.x*1.6+uTime*.01,p.y*3.5+.5)); float cm=smoothstep(mix(.32,.58,uGold),mix(.55,.8,uGold),cl); vec3 sunc=mix(vec3(.5,.45,.4),vec3(1.,.6,.3),uGold); vec3 glow=sunc*(.006/(sd*sd+.003))+vec3(1.,.8,.55)*smoothstep(.02,.016,sd)*8.; sky+=glow*(1.-cm*mix(.93,.55,uGold)); vec3 cc=mix(vec3(.06,.065,.08),vec3(.8,.4,.2)*(.5+cl),uGold); sky=mix(sky,cc,cm*mix(.85,.6,uGold)); float z=.05/(max(dy,0.)+.03); float w=fbm(vec2(p.x*z*3.,z*3.+uTime*.25)); vec3 sc=mix(vec3(.012,.02,.03),vec3(.06,.03,.015),uGold)*(.6+.8*w); sc+=hc*.35*exp(-dy*4.)*(.5+w); sc+=sunc*2.*smoothstep(.55,.85,w)*exp(-abs(p.x-sunp.x)*5.)*exp(-dy*2.5)*mix(.3,1.,uGold); // golden-hour water: translucent teal-gold body, sky reflection, glints vec3 body=mix(vec3(.01,.1,.12),vec3(.45,.4,.1),exp(-dy*5.))*(.55+.6*w); vec3 refl=mix(vec3(.55,.3,.2),vec3(1.,.6,.3),exp(-abs(p.x-sunp.x)*3.))*(.35+.5*cl); float fres=.22+.5*exp(-dy*3.); vec3 gw=mix(body,refl,fres); float gl=smoothstep(.68,.88,fbm(vec2(p.x*z*12.,z*10.+uTime*.6))); gw+=vec3(1.,.7,.35)*5.*gl*exp(-abs(p.x-sunp.x)*2.2)*exp(-dy*1.4); gw+=vec3(1.,.75,.4)*1.5*exp(-dy*40.); sc=mix(sc,gw,uGold); vec3 uc=mix(vec3(.15,.62,.6),vec3(.01,.16,.25),sat(dy*1.6)); uc*=.8+.35*sin(p.x*18.+p.y*5.+uTime*.4)*exp(-dy*2.); float sandY=-.38+.025*fbm(vec2(p.x*3.,2.)); float gx=p.x*45.; float id=floor(gx); float f=fract(gx)-.5; float hg=.04+.07*hash12(vec2(id,1.)); float t=(p.y-(sandY-.01))/hg; float sway=.25*sin(uTime*1.2+id)*t*t; float blade=step(0.,t)*step(t,1.)*(1.-smoothstep(.08*(1.-t)+.02,.16*(1.-t)+.03,abs(f-sway))); blade*=step(.35,hash12(vec2(id,5.)))*smoothstep(.06,.14,abs(p.x-.02)); float inSand=1.-smoothstep(-.003,.003,p.y-sandY); vec3 sand=vec3(.5,.42,.28)*(.5+.6*fbm(p*vec2(20.,60.))); sand=mix(sand,uc*.5,.35); uc=mix(uc,sand,inSand); uc=mix(uc,vec3(.05,.35,.12)*(.6+.6*t),blade); vec3 below=mix(sc,uc,uUnder); vec3 c=mix(sky,below,smoothstep(-.002,.002,dy)); c+=vec3(.5,.8,.8)*uUnder*exp(-abs(dy)*80.)*.6; c*=1.-.25*(1.-smoothstep(.1,.55,vUv.x))*smoothstep(.45,.7,vUv.y); vec2 bp=vec2(.4,wl(.4)+.028); float sl=(wl(.46)-wl(.34))/.12; float tilt=atan(sl)*.8-.75*uTaut; float cs=cos(tilt),sn=sin(tilt); vec2 st=bp+vec2(cs*-.15-sn*-.03,sn*-.15+cs*-.03); vec2 an=vec2(.02,-.11); an.y-=(1.-uVis)*.1; float sag=.12*(1.-uTaut); float md=1e3; float bt=0.; for(int i=0;i<32;i++){ float tt=float(i)/31.; vec2 pt=st+(an-st)*tt+vec2(0.,-sag*4.*tt*(1.-tt)); float dl=length(p-pt); if(dl-.035?1.:.88)*(q.x<0.?1.:.8); vec3 sc2=paper*(q.x<0.?1.:.7)*(1.-.2*smoothstep(.006,0.,abs(q.x))); vec3 bc=mix(hc2,sc2,sailm*(1.-hullm*step(q.y,0.))); float bm=max(hullm,sailm); float subm=mix(smoothstep(W-.012,W-.006,p.y),1.,uUnder); bc*=mix(vec3(1.),vec3(.4,.75,.75),uUnder*(1.-smoothstep(W-.003,W+.003,p.y))); c=mix(c,bc,bm*subm); c*=1.-.35*uUnder*smoothstep(.3,.9,length(p)); o=vec4(c,1.); }`,'boat sea') }; }, draw(s,d,r){ const E=d.E, k1=s.k(1,0,4), k2=s.k(2,0,3.5); const lvl=-.06+.2*k1-.17*k2; const under=s.k(1,.8,3.6)*(1-s.k(2,0,1.4)); const amp=.006+.004*k1+.04*k2; const taut=Math.max(.35*(1-s.k(1,0,.01)),0)*0+s.k(1,1,4.2)*(1-s.k(2,0,1)); const vis=1-s.k(2,.2,1.6); const gold=s.k(2,.3,3.5); r.sea.draw({uLvl:lvl,uUnder:under,uGold:gold,uAmp:amp,uTaut:taut,uVis:vis}); const col='#f6efe0'; d.text('Your gut expects tomorrow\nto look like today.',{x:150,y:150,size:84,color:col,show:s.k(0,.3,1.6,E.lin),hide:s.k(1,0,.6,E.lin)}); d.text('That is an anchor.',{x:150,y:150,size:110,color:col,show:s.k(1,.8,2,E.lin),hide:s.k(2,0,.6,E.lin)}); d.text('Let go.',{x:150,y:140,size:170,color:col,show:s.k(2,1,2.4,E.lin)}); } });