memoscan
← all memos

Memo 0xcdfc5546…ea56f2 on Ethereum

ngth(c)));}float cllgdtinst = .12 + simplex * .05;float xcllgdt = smoothstep(0., cllgdtinst, cellUv.x) - smoothstep(1.-cllgdtinst, 1., cellUv.x) ;float ycllgdt = smoothstep(0., cllgdtinst, cellUv.y) - smoothstep(1.-cllgdtinst, 1., cellUv.y) ;float cllgdt = xcllgdt * ycllgdt * frame;if(empty == 0.) {c = bldmt(c, vec3(cllgdt), -.2 * (1.-length(c)) * frame);} vec3 cDark = texture2D(tDarkInput, wrapuv).rgb;float cDarkMask = 1.-step(cDark.r, 0.);cDark = strtn(cDark, -1.);float clatt = noise( vec3(vUv * uclattscl , 1.) );if (uStep > 7.) {c = bldsftlgt(c, vec3(clatt), .5);}float maskMixer = length(c);vec3 mask = mix(vec3(1.0, 0., 0.), vec3(0., 1., 0.), maskMixer);vec3 ppr = bgColor;float ydistrt = sn3d( vec3( vUv * vec2(100., 100.), 0. ));float pprnseyscl = map(ydistrt, -1., 1., 3., 6.);float pprnse = sn3d( vec3(vUv * vec2(200., 50.) * pprnseyscl, 0.));ppr = bgColor * .9;if (uStep > 10.) {ppr = bldovl( bgColor, vec3(1.-pprnse), .2 );}if (uStep > 16.) {ppr = bldmt( ppr, vec3(stains), .025 );}c = bldmt(c, ppr, 1.);if (ungt.x == 0.) {c = mix(c, ppr, mask.r);}float drtcld = fm1(vUv*10.);float att = noise(vec3((vUv*7.)+c.rb*2.+uppruvfsst, 1.));att = clamp(att, 0., 1.);if (uStep > 8.) {c = bldscn(c, cnoise, 1.);}if (uStep > 17.) {float attInt = .02;if (usqss.x == 1.) {attInt = .003;}c = bldmt(c, vec3(att), attInt);}if (uStep > 8.) {c = bldovl(c, vec3(drtcld), .2);c = clamp(c, 0., 1.);}if (udkn == 1.) {c = strtn(c, -1. * cDarkMask * frame);vec3 cntrstedC = cntrst(c, .997);c = mix( c, cntrstedC, cDarkMask) ;c = bldovl(c, c*4., udkint*cDarkMask*frame);}float cloud = fm1(vUv*50.);float clcld = fm1(vUv*1.+uclddgrtrlt);if (uStep > 8.) {c = bldovl(c, vec3(clcld), .2);}float squsse = 0.;for (int i = 0; i < 10; i++ ) {float idx = float(i);float rnd = map( random( vec2(idx) ), 0., 1., -1.1, 1.1 );squsse = edge(tContourInput, wrapuv + vec2(rnd, 0.) + vec2(simplex2) * .1 + rnd , vec2(ures.x, ures.y) * .1 );squsse = max(0., min(squsse, .2 + abs(rnd)));c = bldovl(c, vec3(1.), squsse * ufzzstkint * float(i) * .1);}squsse = clamp(squsse, 0., 1.);vec4 cbse = ucbse;vec4 cbse2 = vec4(cbse.x, cbse.y, -.5, cbse.w);vec3 c0 = applycbse(c, cbse);vec3 c1 = applycbse(c, cbse2);float lutMixer = 0.;if (usqss.x == 1.) {lutMixer = cntrdge;}c = mix(c0, c1, lutMixer);if (unblns.x == 1. && cellId.y < clltsh) {c = bldovl(c, vec3(-1.0), cntrdge * .2);}float dirt = 1.;for (int i = 0; i < nbdrts; i++) {vec2 coords = vUv - vec2(.5);coords = scale(coords, vec2(uDirts[i].x, uDirts[i].y), vec2(.5));coords += uptuvtrlt;float d = gtdt(coords*udtintfq[i].y, vec2(uDirts[i].z, uDirts[i].w));dirt = bldmt(vec3(dirt), vec3(d), udtintfq[i].x).r;}if (upidx == 6.) {vec3 woffset = vec3(0.);float key = chrky( c, vec3(133., 106., 30.) / 255., woffset );c = mix(c, vec3(175.,179.,193.) / 255., key * frame * fllcll * (1.-cmask));}if (usqss.y == 1.) {c *= ubg.rgb;}gl_FragColor = vec4(c, 1.);}",Lt=`uniform sampler2D tInput;uniform vec2 uflp;uniform vec2 ungt;uniform float uStep;varying vec2 vUv; vec3 brhtnss(vec3 color, float value) {return color + value;} vec2 rotate(vec2 uv, float rotation){float mid = 0.5;return vec2(cos(rotation) * (uv.x - mid) + sin(rotation) * (uv.y - mid) + mid,cos(rotation) * (uv.y - mid) - sin(rotation) * (uv.x - mid) + mid);}vec2 rotate(vec2 uv, float rotation, vec2 mid){return vec2(cos(rotation) * (uv.x - mid.x) + sin(rotation) * (uv.y - mid.y) + mid.x,cos(rotation) * (uv.y - mid.y) - sin(rotation) * (uv.x - mid.x) + mid.y);}vec2 rotate(vec2 uv, float rotation, float mid){return vec2(cos(rotation) * (uv.x - mid) + sin(rotation) * (uv.y - mid) + mid,cos(rotation) * (uv.y - mid) - sin(rotation) * (uv.x - mid) + mid);}vec2 scale(vec2 uv, float scale, vec2 origin) {return (uv - origin) * scale + origin;}vec2 scale(vec2 uv, vec2 scale, vec2 origin) {return (uv - origin) * scale + origin;} void main() {float uvx = vUv.x;float uvy = vUv.y;if (uflp.x == 1.) {uvx = 1.-vUv.x;}if (uflp.y == 1.) {uvy = 1.-vUv.y;}vec2 uv = vec2(uvx, uvy);vec3 c = texture2D(tInput, uv).rgb;gl_FragColor = vec4(c, 1.);}`;const Nt=` vec2 wrapuv = vec2(vUv.x, vUv.y) * -10.;float fllcll = 1.;if (uStep == 0. ) { wrapuv.x *= .5;}float nbStripes = 1.;if (uStep > 3.) { nbStripes = unblns.x;}float cellIdOffset = urnd * 10.;if (unblns.x == 10.) { cellIdOffset *= step(.35, urnd);}vec2 cellId = floor( (mod(vUv, 1.))*nbStripes)/nbStripes;cellId += vec2(random(vec2(cellId.x*cellIdOffset+cellId.y+ucllff.x*10.)));cellId = mod(cellId, 1.);vec2 cellUv = mod(vUv, vec2(1./nbStripes)) * nbStripes;float v = rnduv(floor(vUv * 1.));float stripes = floor(( fract( vUv.y + v ) *nbStripes))/nbStripes;stripes *= floor(vUv.y *nbStripes)/nbStripes*1000.;float offset = 0.;offset += pertub * .5;float xstripes = floor(( fract( vUv.x + v ) *nbStripes))/nbStripes;stripes *= xstripes;if (uStep > 0.) { wrapuv.x *= offset * .2; wrapuv.x += offset * 30.; wrapuv.x += stripes * 10.5; wrapuv.x += stripes - noise(vec3(stripes*100.)) - 1.;}float rot = 0.;float direction = curl.r < -1. ? 1. : -1.;if (uStep > 2.) { rot = #rtfmla; rot += #rtaddfmla;}float ffctrd = 1.;float ffcagl = 2. * PI;vec2 swlCenter = uswl.xy;vec2 swlUv = vUv * 1. - swlCenter;float dstctr = distance(vUv, swlCenter) - .1;dstctr = clamp(dstctr, 0., 1.);float len = uswl.z + length(swlUv * vec2(ratio, 1.));float angle = atan(swlUv.y, swlUv.x) + ffcagl * smoothstep(ffctrd, 0., len);#rtswlfmla; rot += uglrt;vec2 centeredUV = rotate(vUv, rot, vec2(0.));if (uStep > 1.) { wrapuv.x += #wrapx;}wrapuv = scale(wrapuv, vec2(.2, 1.), vec2(0.)); `,D=e.form;let w=Ne;w=w.replace("#crlchnk1",D.crlchnk1);w=w.replace("#crlchnks",D.crlchnks);w=w.replace("#crlchnks1",D.crlchnks1);w=w.replace("#crlchnks2",D.crlchnks2);w=w.replace("#crlchnk2",D.crlchnk2);w=w.replace("#crlbse",D.crlbse);w=w.replace("#curlExp0",D.crlxps[0]);w=w.replace("#curlExp1",D.crlxps[1]);w=w.replace("#curlExp2",D.crlxps[2]);let d=At;d=d.replace("${curl}",w);d=d.replace("${noisecommon}",Te);d=d.replace("${pnoise}",Oe);d=d.replace("${snoise}",Ue);d=d.replace("${grain}",Xe);d=d.replace("${noise}",Ge);d=d.replace("${fm}",Ye);d=d.replace("${adjust}",Je);d=d.replace("${blend}",Re);d=d.replace("${edge}",je);d=d.replace("${wrapuv}",Nt);d=d.replace("#rtfmla",D.rtfmla);d=d.replace("#rtaddfmla",D.rtaddfmla);d=d.replace("#rtswlfmla",D.rtswlfmla);d=d.replace("#wrapx",D.wrapx);new THREE.Vector2;new THREE.Vector3;const Ze=new THREE.Vector4,Ot=l=>{let c=null,s=null,a,o,t,i,u,f=null,R=ze(4096);const $=()=>{c=Bt(),s=Wt(c.getColorTexture())},T=()=>{a=new THREE.Scene,o=new THREE.PerspectiveCamera(45,e.width/e.height,.01,100);let x=oe(e.bgColor);x=ne(x.h,x.s,x.l);let p=[],I=[];t=new THREE.ShaderMaterial({defines:{nbdrts:e.dirts.length},uniforms:{ures:{value:new THREE.Vector2(e.width,e.height)},uDebug:{value:e.debugView},tInput:{value:c.getColorTexture()},tWrap:{value:c.getWrapTexture()},tDirtInput:{value:c.gtdtColorTexture()},tDarkInput:{value:c.getColorSelectionTexture()},tContourInput:{value:c.getContourTexture()},tRotationInput:{value:c.getRotationTexture()},tEmpties:{value:c.getEmptiesTexture()},tStrokesInput:{value:s.getColorTexture()},ubg:{value:new THREE.Vector4(x.r/255,x.g/255,x.b/255,e.bgColorScale)},upprCBSE:{value:new THREE.Vector4(e.pprcntrst,e.pprbrhtnss,e.pprstrtn,e.pprxpsr)},uartcbse:{value:new THREE.Vector4(e.artcntrst,e.artbrhtnss,e.artstrtn,e.artxpsr)},uarthsft:{value:e.arthsft},ucbse:{value:new THREE.Vector4(e.cntrst,e.brhtnss,e.strtn,e.xpsr)},uptscl:{value:e.pertubScale},uptuvscl:{value:e.pertubUVScale},uptuvtrlt:{value:new THREE.Vector2(e.pertubUVTranslateX,e.pertubUVTranslateY)},uclddgrtrlt:{value:new THREE.Vector2(e.clddegtrslt.x,e.clddegtrslt.y)},uclattscl:{value:e.clattScale},ugrnscl:{value:e.grainResScale},ucntr:{value:new THREE.Vector3(1,e.contourWidth,1)},unblns:{value:new THREE.Vector2(e.nbLinesX,e.nbLinesY)},ucllbrdsz:{value:e.cellBorderSize},ucrl:{value:new THREE.Vector4(e.curl.pos.x,e.curl.pos.y,e.curl.scl.x,e.curl.scl.y)},ucrlwrp:{value:new THREE.Vector2(e.curl.wrap.x,e.curl.wrap.y)},ucrlscl:{value:e.form.crlsck2},upclskint:{value:e.pclstkIntensity},unseclint:{value:e.nsyclIntensity},uogclint:{value:e.isDark?0:e.ogclint},uhstkint:{value:e.hstkIntensity},ufzzstkint:{value:e.fzzstkint},udkint:{value:e.darkIntensity},uswl:{value:new THREE.Vector3(e.swl[0],e.swl[1],e.swl[2])},ucllff:{value:new THREE.Vector2(e.ucllff.x,e.ucllff.y)},udkn:{value:e.isDark?1:0},udkncl:{value:new THREE.Vector4(x.r/255,x.g/255,x.b/255,e.bgColorScale)},upprtp:{value:new THREE.Vector2(e.pprType.x,e.pprType.y)},uscrch:{value:new THREE.Vector2(e.scrch.x,e.scrch.y)},uwrsz:{value:new THREE.Vector4(e.wearSize.x,e.wearSize.y,e.wearSize.y,e.wearSize.w)},uglrt:{value:e.globalRot},ufllcll:{value:new THREE.Vector2(e.fllclls.x?1:0,e.fllclls.y)},uframeprm:{value:new THREE.Vector4(e.frameParams.x,e.frameParams.y,e.frameParams.z,e.frameParams.w)},ungt:{value:new THREE.Vector2(e.night[0],e.night[1])},uDirts:{value:p},udtintfq:{value:I},udtbld:{value:e.dirtBlend},usqss:{value:new THREE.Vector2(e.issqusse[0],e.issqusse[1])},urnd:{value:e.rnd},upidx:{value:e.paletteIdx},uWRes:{value:e.scl},urt:{value:e.rotate},urtfq:{value:e.rotateFreq},uedgwdh:{value:e.edgeWidth},uflp:{value:new THREE.Vector2(e.flip.x,e.flip.y)},uStep:{value:1}},vertexShader:j,fragmentShader:d}),t.ex