0xa0154806…bb3asent to0x1353fd9d…e4e8·#17,077,531·view on Etherscan
"use strict";let R,N=30,Nrand=100,dx=0,dy=0,dz=0,dxc=0,dyc=0,dzc=0,dxp=0,dyp=0,dzp=0,xc=0,yc=0,zc=1,TWO_PI=6.28318530718,Nrad0=5,E=4,LL=10;const head=/\bHeadlessChrome\//.test(navigator.userAgent);let PI=3.1415926;for(var GET={},query=window.location.search.substring(1).split("&"),i=0,max=query.length;i<max;i++)if(""!==query[i]){var param=query[i].split("=");GET[decodeURIComponent(param[0])]=decodeURIComponent(param[1]||"")}let pals=[];pals.push([[359,31,56],[353,19,97],[6,20,96],[22,21,92],[20,16,98],[28,21,99],[6,20,96],[347,13,96]]),pals.push([[208,49,38],[205,41,59],[192,29,45],[190,14,64],[220,9,78],[12,4,45],[167,16,81],[180,7,100]]),pals.push([[222,86,22],[208,88,29],[203,61,57],[215,49,74],[211,68,93],[236,100,24],[195,85,45]]),pals.push([[4,100,34],[1,96,84],[26,92,94],[34,58,89],[48,100,99],[21,100,84],[8,100,17]]),pals.push([[43,35,28],[46,39,42],[41,27,90],[39,46,49],[39,83,90],[46,6,96],[46,15,97]]),pals.push([[209,92,15],[197,98,24],[195,79,37],[190,42,64],[189,62,90]]),pals.push([[331,21,31],[265,23,40],[335,26,76],[163,32,22],[210,24,29],[180,31,97],[49,30,63],[180,23,90],[170,13,48]]),pals.push([[26,71,17],[26,78,23],[42,68,60],[40,46,60],[42,76,74],[37,62,74]]),pals.push([[102,41,55],[123,37,63],[94,27,65],[121,30,69],[91,26,67],[125,37,63]]),pals.push([[115,52,17],[98,51,40],[78,58,54],[91,67,84],[6,54,38]]),pals.push([[349,83,69],[250,44,66],[191,44,66],[27,82,72],[45,85,70],[0,100,79]]),pals.push([[221,20,21],[199,26,38],[190,10,81],[220,0,100],[190,0,100],[205,30,43],[183,20,100],[215,43,36],[185,0,100],[200,0,100]]);let header="#version 300 es\nprecision highp float;\nprecision highp int;";var src_vert=header+"\nin vec2 a;\nout vec2 u;\nvoid main() {\n gl_Position = vec4(a,0.,1.);\n u = a/2. +vec2(.5,.5);\n}",src_pap=header+"\nconst int N = 30;\nconst int LL = 10;\nconst float Nf =20.;\nconst int Nrand =100;\nconst float Nrandf =100.;\nconst float PI =3.1415926;\n\nin vec2 u;\nout vec4 cout;\n\nuniform vec2 L;\nuniform highp sampler2D img;\nuniform float rand[Nrand];\n\nuniform float kl[N];\nuniform float ax[LL];\nuniform float ay[LL];\nuniform float az[LL];\nuniform vec3 v;\n\nfloat s1,c1,xe,ye,ze,Nrad,clarity,wf0,rr00,lgfac,wild,inv,night,lo,phase,rain,famp,kkx,kky,scalefac,ox,oy,rv;\nint nn; vec3 rlight;\n\nvec2 proj( in vec3 v, in vec3 ve, in vec2 tt) {\n float c = ve.z/(ve.z+v.z);\n return vec2((v.x-ve.x + tt[0]*v.z)*c, (v.y-ve.y + tt[1]*v.z)*c);\n}\nfloat dot3( in vec3 v, in vec3 w) { return v[0]*w[0] + v[1]*w[1] + v[2]*w[2]; }\nvec3 rot3d( in vec3 v, in vec3 k, in float theta) { // rotation of vector v about axis k, angle t with Rodrigues formula:\n return v*cos(theta)+cross(k,v)*sin(theta)+k*dot3(k,v)*(1.-cos(theta));\n}\nfloat norm3( in vec3 v) { return sqrt(dot3(v,v)); }\nvec3 flow( in vec3 r, in vec3 p) {\n return r + vec3(sin(2.*PI*rand[0]+3.*p[0]*r.x),sin(2.*PI*rand[1]+2.*p[1]*r.y),0.)*p[2]/200.;\n}\n\nvec2 ccircle(in vec2 uv, in float x, in float y, in float D, in float t1, in float t2) {\n float dx = x-uv.x; float dy = y-uv.y;\n float d = (dx*dx+dy*dy)/(D*D/4.);\nreturn .07*exp(-d*D*D)*float(dy>0.&&dx*dx<.001)*rain+exp(-(2.+6.*kl[0])*d)*vec2(1.,0.);\n}\n\nvoid main(void) {\n c1 = kl[0];\n s1 = kl[1];\n xe = kl[2];\n ye = kl[3];\n ze = kl[4];\n nn = int(kl[5]);\n Nrad = kl[6];\n clarity = kl[7];\n wf0 = kl[8];\n rr00 = kl[9];\n lgfac = kl[10];\n wild = kl[11];\n rlight = vec3(kl[12],kl[13],kl[14]);\n inv = kl[15];\n night = kl[16];\n lo = kl[17];\n phase = kl[18];\n rain = kl[19];\n famp = kl[20];\n kkx = kl[21];\n kky = kl[22];\n scalefac = kl[23];\n ox = kl[24];\n oy = kl[25];\n rv= kl[26];\nfloat mel1 = kl[27];\nfloat mel2 = kl[28];\nfloat count = kl[29];\n\nvec2 uv = u;\nvec2 uc = u;\n\nvec4 cc = texture(img,uc);\n\nif (L.x<L.y) {\n uv.y = 0.5 + (L.y/L.x)*(uv.y-0.5);\n uc.y = 0.5 + (L.y/L.x)*(uc.y-0.5);\n} else {\n uv.x = 0.5 + (L.x/L.y)*(uv.x-0.5);\n uc.x = 0.5 + (L.x/L.y)*(uc.x-0.5);\n}\n\ncout = cc;\n//cout.xy*=1. - .02*rain-.02*night;\n\nfloat dtt = 1.0;\n\nvec3 ve = vec3(xe,ye,ze);\nvec3 param = vec3(kkx,kky,famp);\nvec2 tt = vec2(c1,s1);\nfloat st=0.;\nfloat cnt=0.;\nint thmax = int(Nrad);\nfor( int j=0; j<nn; j++ ) {\n vec3 p = vec3(ax[j],ay[j],az[j]);\n float wf = wf0*(10.+min(240.,2./(0.005+ay[j])));\n for ( int th=0; th<thmax; th++) {\n cnt++;\n vec3 v1 = rot3d(vec3(1.,0.,0.),vec3(v[0],v[1],v[2]),(rv+2.*mel1+cnt/Nrad)*2.*PI);\n float ri = clarity + (1.-clarity)*(0.2+0.8*rand[int(mod(cnt,Nrandf))]);\n float ri0 = ri;\n float ri2 = fract(237.*ri);\n float ri3 = fract(191.*ri);\n float ri4 = fract(257.*ri);\n float fac = 1.;\n vec3 pr = flow(p+v1*1./200.*fac*ri*wf,param);\n //vec3 pr = p + .4*v1/200.*fac*wf*ri;\n vec2 p1 = proj(pr,ve,tt);\n float rr = 3.*wf0*(2.-clarity)*rr00*3.; //*ri;\n float aaa = 3.2/Nrad;\n aaa *= 2./(2.-clarity);\n //rr*=1.-count;\n float rref = rr;\n float aref = aaa;\n //aaa *= 1.-4.*az[j];\naaa*=2.;\n vec3 dr = rlight + vec3(xe,ye,ze) - pr;\n float xx = dot3(v1,dr)/length(dr);\n float axx = abs(xx); //axx=min(1.,max(0.,axx));\n dr-= .1*vec3(rand[11],rand[12],rand[13]);//.02*ff.yzx;\n float xx2 = dot3(v1,dr)/length(dr);\n\n vec2 hsb = vec2(axx,xx2);\n if (xx<0.) {\n hsb*=0.;\n aaa=1.;\n }\n float vv = min(.27,3.*(hsb.x+hsb.y));\n vv *= 1. + 0.25/rr/rr;\n float dt = 0.01*(1.+3.*ri4);\n fac = exp(ri3*2.);\n rr *= .45*fac;\n aaa*= 1.1/fac;\n vv*= 1.-.2*night;\n vv*= 1.-abs(sin(ri));\n vec2 v2 = proj(v1,ve,tt);\n float t1 = phase + 0.1 + .8*atan(v2.y,v2.x);\n if (xx<0.) { t1 += PI; }\n float t2 = t1 + dt;\n t1 -= dt;\n vv*=2.;\n vec4 cc_rgb = vec4(hsb.xy*vv,1.,min(1.,aaa));\n// vec4 cc_line = vec4(0.9,0.2,1.,.2*aaa);\n // if (rain>0. && xx>0. && st>0.) {rr*=exp(2.*ri4);}\n vec2 cd = ccircle(uc,ox+scalefac*p1.x,1.-oy+scalefac*p1.y,rr/200.,t1,t2);\n cout = mix(cout, cc_rgb, mel1*cc_rgb.w*cd[0]);\n pr = flow(vec3(p.x,-p.y,p.z)+v1/200.*fac*ri*wf,param);\n p1 = proj(pr,ve,tt);\n cd = ccircle(uc,ox+scalefac*p1.x,1.-oy+scalefac*p1.y,rr/200.,t1,t2);\n cout = mix(cout, cc_rgb, mel1*cc_rgb.w*cd[0]);\n }\n}\n}",src_simp=header+"\nconst int N = 30;\nconst int LL = 10;\nconst float Nf =20.;\nconst int Nrand =100;\nconst float Nrandf =100.;\nconst float dn =0.1;\nconst int Nx =512;\nconst float Nxf =512.;\nconst float PI =3.1415926;\nconst int numOctaves = 8;//9;\n//const float TT = 120.;\n\nin vec2 u;\nout vec4 cout;\n\nuniform vec2 res;\nuniform vec2 L;\nuniform float t; // frame number\nuniform highp sampler2D img;\nuniform highp sampler2D img00;\nuniform float kp[N];\nuniform float rand[Nrand];\nuniform vec3 dxy;\nuniform vec3 rc;\n\nvec2 hash2( in vec2 x ) {\n int ii = int(mod(x.x+res.x*x.y,Nrandf)); //counter into array of random #s\n int i2 = int(mod(x.y-res.y*x.x,Nrandf)); //counter into array of random #s\n return vec2(rand[ii],rand[i2]);\n}\nfloat ddot ( in vec2 x, in vec2 y ) { return x.x+y.x + x.y*y.y; }\nvec3 noise( in vec2 p ) {\n vec2 i = floor( p );\n vec2 f = fract( p );\n\n vec2 u = f*f*f*(f*(f*6.0-15.0)+10.0);\n vec2 du = 30.0*f*f*(f*(f-2.0)+1.0);\n\n vec2 ga = hash2( i + vec2(0.0,0.0) );\n vec2 gb = hash2( i + vec2(1.0,0.0) );\n vec2 gc = hash2( i + vec2(0.0,1.0) );\n vec2 gd = hash2( i + vec2(1.0,1.0) );\n\n float va = ddot( ga, f - vec2(0.0,0.0) );\n float vb = ddot( gb, f - vec2(1.0,0.0) );\n float vc = ddot( gc, f - vec2(0.0,1.0) );\n float vd = ddot( gd, f - vec2(1.0,1.0) );\n return vec3( va + u.x*(vb-va) + u.y*(vc-va) + u.x*u.y*(va-vb-vc+vd), // value\n ga + u.x*(gb-ga) + u.y*(gc-ga) + u.x*u.y*(ga-gb-gc+gd) + // derivatives\n du * (u.yx*(va-vb-vc+vd) + vec2(vb,vc) - va));\n}\n\nvec3 fbm( in vec2 x, in float H )\n{\n float G = exp(-2.*H);\n float f = 1.0;\n float a = 1.0;\n vec3 t = vec3(0.);\n for( int i=0; i<numOctaves; i++ )\n {\n t += a*noise(f*x);\n f *= 2.0;\n a *= G;\n }\n return t;\n}\n\nvec4 laplacian(in sampler2D img, in vec2 uv, in float dx) {\n vec2 dt = 1./res;\n vec4 rg = texture(img, uv + vec2(0, 0)*dt) * -1.;\n rg += texture(img, uv + vec2(-1, -1)*dt)*(0.05+dx);\n rg += texture(img, uv + vec2(-0, -1)*dt)* (0.2-dx);\n rg += texture(img, uv + vec2(1, -1)*dt)* (0.05+dx);\n rg += texture(img, uv + vec2(-1, 0)*dt) * (0.2-dx);\n rg += texture(img, uv + vec2(1, 0)*dt) * (0.2-dx);\n rg += texture(img, uv + vec2(-1, 1)*dt) * (0.05+dx);\n rg += texture(img, uv + vec2(0, 1)*dt) * (0.2-dx);\n rg += texture(img, uv + vec2(1, 1)*dt) * (0.05+dx);\n\n return rg;\n}\nvec2 proj( in vec3 v, in vec3 ve, in vec2 tt) {\n float c = ve.z/(ve.z+v.z);\n return vec2((v.x-ve.x + tt[0]*v.z)*c, (v.y-ve.y + tt[1]*v.z)*c);\n}\nfloat dot3( in vec3 v, in vec3 w) { return v[0]*w[0] + v[1]*w[1] + v[2]*w[2]; }\nvec3 rot3d( in vec3 v, in vec3 k, in float theta) { // rotation of vector v about axis k, angle t with Rodrigues formula:\n return v*cos(theta)+cross(k,v)*sin(theta)+k*dot3(k,v)*(1.-cos(theta));\n}\nfloat norm3( in vec3 v) { return sqrt(dot3(v,v)); }\nvec3 flow( in vec3 r, in vec3 p) {\n return r + vec3(sin(2.*PI*rand[0]+3.*p[0]*r.x),sin(2.*PI*rand[1]+2.*p[1]*r.y),0.)*p[2]/200.;\n}\n\nvoid main(void) {\n vec2 dt = rc.z/res;\n vec2 uv = (u+dxy.xy-vec2(0.5))*(1.+dxy.z)+vec2(0.5);\n vec2 uc = -rc.xy + (u)*rc.z; // global coords\n vec3 ff = (0.4+0.6*kp[9])*fbm(uc+fbm(uc,1.).yz,0.4+.4*kp[0]);\n vec3 f2 = (0.4+0.6*kp[10])*fbm(-11.*kp[11]*uc+fbm(-17.*kp[10]*uc,0.7).yz,0.7-.4*kp[1]);\n\nvec4 lp,lp2,cv,cu,cv2,cu2;\nfloat aa,bb;\n\nuc=uv;\n\nvec4 cc0 = texture(img00,uv);\n\nuc.y += kp[0]*0.2*rand[3]*ff.z*f2.x*cc0.x;//*mel1;\nuc.x += kp[1]*0.2*rand[3]*ff.y*f2.x*cc0.y;//*mel1;\n\nvec4 cc = texture(img,uc);\n\nff.x += .1*cc0.x;\nf2.x += .1*cc0.y;\n\nfloat th = ff.x;\nfloat dtt = 1.;\n\nvec2 dist = .5*dtt*0.01*(cc.x-cc.w)*vec2(kp[18]*cos(th)*(ff.y+kp[4]*ff.z),kp[19]*sin(th)*(ff.z-kp[4]*ff.y));\ndist.xy += rand[42]*(dist.yx-dist.xy);\nuc+=dist;\n\n aa = cc.x/256. + cc.y;\n bb = cc.z/256. + cc.w;\n lp = laplacian(img,uc,(kp[0]*2.-1.)*f2.x*(1.-aa));\n lp2 = laplacian(img,uc,(kp[1]*2.-1.)*ff.x*bb);\n\n uc.x += dtt*0.1*(lp.x-lp.w)*cos(th)*(ff.y+kp[4]*ff.x);\n uc.y += dtt*0.1*(lp.x-lp.w)*sin(th)*(ff.x-kp[4]*ff.y);\n uc.x += dtt*0.1*(cc.x-cc.w)*cos(th)*(ff.y+kp[4]*ff.x);\n uc.y += dtt*0.1*(cc.x-cc.w)*sin(th)*(ff.x-kp[4]*ff.y);\n\n cv= texture(img, uc + vec2(0, 1)*dt);\n cu= texture(img, uc + vec2(1, 0)*dt);\n cv2= texture(img, uc + vec2(0, -1)*dt);\n cu2= texture(img, uc + vec2(-1, 0)*dt);\n\nfloat da = .4*(1.-kp[15])*(1.-bb)*(lp.x+256.*lp.y)/256. + 3.*( -aa*bb*bb + 0.015*(1.+kp[17])*(1.-aa))*ff.x*ff.x ;\nfloat db = .4*(1.-kp[16])*(1.+kp[7])*(0.02+ff.x*ff.x)*aa*0.5*(lp2.z+256.*lp2.w)/256. + 3.*( aa*bb*bb - 0.04*(1.+1.*kp[6])*bb)*ff.x*ff.x;\n\nfloat dda=kp[15]*0.18*((cu.x/256.+cu.y-cu2.x/256.-cu2.y)*ff.y*kp[18] + (cv.x/256.+cv.y-cv2.x/256.-cv2.y)*ff.z*kp[19]);\nfloat ddb=kp[16]*0.18*((cu.z/256.+cu.w-cu2.z/256.-cu2.w)*f2.y*kp[18] + (cv.z/256.+cv.w-cv2.z/256.-cv2.w)*f2.z*kp[19]);\n\nda -= .3*cc0.x*cc0.x*ff.x;\ndb += .3*cc0.y;\n\ndda*=dda*6.*dtt;\nddb*=ddb*6.*dtt;\nda += dda;//*(1.-dda);\ndb += ddb;//*(1.-ddb);\n\nda*= 46000.;\ndb*= 46000.;\n\n da+=aa*256.*256.*.99;\n db+=bb*256.*256.*.99;\n\nfloat yn = floor(da/256.); // get leading part of da and rescale\nfloat xn = (da-yn*256.);\nfloat wn = floor(db/256.); // get leading part of da and rescale\nfloat zn = (db-wn*256.);\n\ncout = vec4(xn,yn,zn,wn)/256.;\n}",src_colp=header+"\nconst int N = 30;\nconst float Nf =20.;\nconst int Nrand =100;\nconst float Nrandf =100.;\nconst float dn =0.1;\nconst int Nx =512;\nconst float Nxf = .25*512.;\nconst float PI =3.1415926;\nconst int numOctaves = 8;\n\nin vec2 u;\nout vec4 cc;\n\nuniform vec2 res;\nuniform vec2 L;\nuniform float t; // frame number\nuniform highp sampler2D img;\nuniform highp sampler2D img2;\nuniform highp sampler2D img00;\nuniform highp sampler2D pal; // palette\nuniform float rand[Nrand];\nuniform vec3 dxy;\nuniform vec3 rc;\nuniform float kl[N];\n\nvec2 hash2( in vec2 x ) {\n int ii = int(mod(x.x+res.x*x.y,Nrandf)); //counter into array of random #s\n int i2 = int(mod(x.y-res.y*x.x,Nrandf)); //counter into array of random #s\n return vec2(rand[ii],rand[i2]);\n}\nfloat ddot ( in vec2 x, in vec2 y ) { return x.x+y.x + x.y*y.y; }\nvec3 noise( in vec2 p ) {\n vec2 i = floor( p );\n vec2 f = fract( p );\n\n vec2 u = f*f*f*(f*(f*6.0-15.0)+10.0);\n vec2 du = 30.0*f*f*(f*(f-2.0)+1.0);\n\n vec2 ga = hash2( i + vec2(0.0,0.0) );\n vec2 gb = hash2( i + vec2(1.0,0.0) );\n vec2 gc = hash2( i + vec2(0.0,1.0) );\n vec2 gd = hash2( i + vec2(1.0,1.0) );\n\n float va = ddot( ga, f - vec2(0.0,0.0) );\n float vb = ddot( gb, f - vec2(1.0,0.0) );\n float vc = ddot( gc, f - vec2(0.0,1.0) );\n float vd = ddot( gd, f - vec2(1.0,1.0) );\n\n return vec3( va + u.x*(vb-va) + u.y*(vc-va) + u.x*u.y*(va-vb-vc+vd), // value\n ga + u.x*(gb-ga) + u.y*(gc-ga) + u.x*u.y*(ga-gb-gc+gd) + // derivatives\n du * (u.yx*(va-vb-vc+vd) + vec2(vb,vc) - va));\n}\n\nvec3 fbm( in vec2 x, in float H )\n{\n float G = exp(-2.*H);\n float f = 1.0;\n float a = 1.0;\n vec3 t = vec3(0.0);\n for( int i=0; i<numOctaves; i++ )\n {\n t += a*noise(f*x);\n f *= 2.0;\n a *= G;\n }\n return t;\n}\n\nvec4 laplacian(in sampler2D img, in vec2 uv, in float dx) {\n vec2 dt = 1./res;\n vec4 rg = texture(img, uv + vec2(-1, -1)*dt)*(0.05+dx);\n rg += texture(img, uv + vec2(-0, -1)*dt)* (0.2-dx);\n rg += texture(img, uv + vec2(1, -1)*dt)* (0.05+dx);\n rg += texture(img, uv + vec2(-1, 0)*dt) * (0.2-dx);\n rg += texture(img, uv + vec2(0, 0)*dt) * -1.;\n rg += texture(img, uv + vec2(1, 0)*dt) * (0.2-dx);\n rg += texture(img, uv + vec2(-1, 1)*dt) * (0.05+dx);\n rg += texture(img, uv + vec2(0, 1)*dt) * (0.2-dx);\n rg += texture(img, uv + vec2(1, 1)*dt) * (0.05+dx);\n\n return rg;\n}\n\nfloat dot3( in vec3 v, in vec3 w) { return v[0]*w[0] + v[1]*w[1] + v[2]*w[2]; }\nvec3 rot3d( in vec3 v, in vec3 k, in float theta) { // rotation of vector v about axis k, angle t with Rodrigues formula:\n return v*cos(theta)+cross(k,v)*sin(theta)+k*dot3(k,v)*(1.-cos(theta));\n}\n\nvoid main(void) //( out vec4 fragColor, in vec2 fragCoord )\n{\nvec2 uv = (u+dxy.xy)*(1.+dxy.z);\nvec2 uc = -rc.xy + u*rc.z;\n\ncc = texture(img,uv); // in [0,1]\nvec4 cco = texture(img2,uv); // in [0,1]\nvec4 cc00 = texture(img00,uv); // in [0,1]\n\nvec3 ff = cc00.xyz;\nvec3 f2 = cc00.yxz;\n\n float aa = (cc.x+256.*cc.y)/256.;\n float bb = (cc.z+256.*cc.w)/256.;\nfloat aao = (cco.x+256.*cco.y)/256.;\nfloat bbo = (cco.z+256.*cco.w)/256.;\n\nvec4 lpo = laplacian(img2,uv,0.9*ff.x*(aao));\nvec4 lp = laplacian(img,uv,0.9*ff.x*(aa));\n\naao=4.*0.03*(lp[0]+lp[1]*256.-lpo[0]-lpo[1]*256.);\nbbo=4.*0.03*(lp[2]+lp[3]*256.-lpo[2]-lpo[3]*256.);\n\nvec4 cc_hsl = texture(pal,vec2(2.*bb*aa+0.4*aa*cc00.x+0.4*bb*cc00.y,ff.xy*bb)); //+ff.yx*aa));\nvec4 cco_hsl = texture(pal,vec2(2.*bbo*aao+0.4*aao*cc00.x+0.4*bbo*cc00.y,ff.xy*bbo)); //+ff.yx*aao));\n\ncc_hsl -= (0.3+.6*rand[37])*(cc_hsl-cco_hsl);\n\n//cc_hsl.x += .3*cc00.x*cc00.x*(3.-2.*cc00.z);\ncc_hsl.x += .5*cc00.x*cc00.z*rand[44];\n\ncc_hsl.x += 0.03*f2.x*bb + rc.x*rc.y; // shift hue\ncc_hsl.x = mod(cc_hsl.x,1.);\n//cc_hsl.z *= 0.2+(3.*bb+6.*aa*bb); // multiply lightness by particle number\ncc_hsl.z *= 0.3+rand[43]*(4.*bb*cc00.z+cc00.x)+(1.-rand[43])*(3.*bb+6.*aa*bb); // multiply lightness by particle number\n\ncc_hsl.y *= 1.0*(1.1-ff.x*bb)*(1.-f2.x*f2.x); // multiply sat by 1-particle number\n\nvec3 rgb = clamp( abs(mod(cc_hsl.x*6.0+vec3(0.0,4.0,2.0),6.0)-3.0)-1.0, 0.0, 1.0 );\nrgb = cc_hsl.z + cc_hsl.y * (rgb-0.5)*(1.0-abs(2.0*cc_hsl.z-1.0));\n\nrgb += rand[39]*(cc_hsl.bgr-rgb);\n\n//rgb += rand[38]*rand[38]*(1.-rgb);\n\nrgb *= rgb*(3.-2.*rgb);\n//rgb *= 1.+cc00.z*(rgb*(3.-2.*rgb)-1.);\nrgb *= .7+.36*rgb*(3.-2.*rgb); //increase contrast, but not too much\n\ncc = vec4(rgb,1.);\n\nvec4 ccoo = vec4(.4+.3*aao-f2.x,.1*(aao+bbo),1.-bbo,1.);\nccoo = mix(ccoo,ccoo.zyxw,1.-ff.y); // change to blue highlights\n\ncc = mix(cc,ccoo,clamp(2.*ff.x*aao,-1.,1.));\ncc=clamp(cc,0.,1.);\n\nfloat fx = fract(uc.x*res.x);//-3.*ff.y);\nfloat fy = fract(uc.y*res.y);//-3.*ff.z);\nfloat r2 = (fx-.5)*(fx-.5)+(fy-.5)*(fy-.5)-0.2*(1.+0.6*kl[16]*cc00.z);\nfloat drr = clamp((r2+.1)*18.,0.,1.);\ncc.rgb *= drr*.5*cc00.z + (1.-drr)*(.8-2.*r2);\n}";let useA,prngA,prngB;class Random{constructor(){useA=!1;let n=function(n){let c=parseInt(n.substr(0,8),16),t=parseInt(n.substr(8,8),16),a=parseInt(n.substr(16,8),16),e=parseInt(n.substr(24,8),16);return function(){c|=0,t|=0,a|=0,e|=0;let n=(c+t|0)+e|0;return e=e+1|0,c=t^t>>>9,t=a+(a<<3)|0,a=a<<21|a>>>11,a=a+n|0,(n>>>0)/4294967296}};prngA=new n(tokenData.hash.substr(2,32)),prngB=new n(tokenData.hash.substr(34,32));for(let n=0;n<1e6;n+=2)prngA(),prngB()}random_dec(){return useA=!useA,useA?prngA():prngB()}}function rnd(){return R.random_dec()}