0x35ed1634…9501sent to0xa7d8d9ef…d270·#14,633,946·view on Etherscan
t.y);vec3 color180 = hsft(color, uShift);color = mix(color, color180, mapper);vec3 colorStripes = hsft(color, -.5);colorStripes = brhtnss(colorStripes, .5);if (uRenderRot == 1.) {color = vec3(uRotations[i]);}float rect = drwrct(vUv, vec2(w, h), vec2(x, y ));vec2 coord = vUv * vec2(1., 1./ratio);coord -= vec2(x, y/ratio);float contourWidth = ucntr.y;float innerWidth = w*0.01*contourWidth;float innerHeight = h*0.08*contourWidth;float inner = drwrct(vUv, vec2(w-innerWidth, h-innerHeight), vec2(x+innerWidth*.5, y+innerHeight*.5 ));if (ucntr.x == 1.) {rect -= inner;}if (length(rects) == 0.) {rects = blendLighten( rects, color, rect * opacity );rects = clamp(rects, 0., 1.);}if (length(rects) > uskptsh) {rects = vec3(0.);}}vec3 c = vec3(rects);gl_FragColor = vec4(c, 1.);}`,Pt="#define PI 3.14159\nuniform sampler2D tInput;uniform sampler2D tContourInput;uniform vec2 ures;uniform vec2 uptuvtrlt;uniform vec2 unblns;uniform vec2 ucllff;uniform vec4 ucrl; uniform float ucrlscl;uniform vec2 ucrlwrp;uniform vec3 uswl;uniform float ucntr;varying vec2 vUv;\nvec2 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;}\n${fm}${edge}${noisecommon}${pnoise}${snoise}${grain}${noise}${curl}\nfloat rnduv(vec2 uv){float seed = uv.y * 100000.;float r = abs(tan(sin(uv.y * seed) * seed));return sqrt(1. - r) * 2. - 1.;}void main() {float ratio = ures.x / ures.y;float uptscl = 1.;float uptuvscl = 1.;vec2 wrapuv = vec2(vUv.x, vUv.y) * -10.;float pertub = noise(vec3((vUv*uptuvscl * .3)+uptuvtrlt, 0.)) ;pertub += sn3d(vec3( (vUv* 6.7)+uptuvtrlt, 0.) ) * 0.01;vec3 curl = crlnse(vec3( (vUv*vec2(1., 1./ratio)*ucrl.z*ucrlscl)+vec2(ucrl.x, ucrl.y), 0.)) * uptscl;float nbStripes = unblns.x;vec2 cellId = floor( (mod(vUv, 1.))*nbStripes)/nbStripes;cellId += vec2(random(vec2(cellId.x+cellId.y+ucllff.x)));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;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.;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}; vec2 centeredUV = rotate(vUv, rot, vec2(0.));wrapuv.x += ${wrapx};wrapuv = scale(wrapuv, vec2(.2, 1.), vec2(0.));vec3 c = texture2D(tInput, wrapuv).rgb;if (ucntr == 1.) {float edge = edge(tContourInput, wrapuv, vec2(ures.x, ures.y) * .1);c = vec3(edge);}gl_FragColor = vec4(c, 1.);}",_t=`uniform vec2 ures;uniform vec4 ushp[nbshp];uniform vec4 ushpcl[nbshp];uniform vec4 udkncl;varying vec2 vUv;float map(float value, float min1, float max1, float min2, float max2) {return min2 + (value - min1) * (max2 - min2) / (max1 - min1);}\${blend}float drwrct(vec2 coord, vec2 dimensions, vec2 offset) {vec2 rct = step(offset, coord);rct *= step(coord, offset + dimensions);return rct.x * rct.y;}void main() {float ratio = ures.x/ures.y;vec3 rects = vec3(0.);vec3 opaqueRects = vec3(0.);vec3 shiftedSelectedCol = vec3(0.);for (int i = 0; i < nbshp; i++) {float x = ushp[i].x;float y = 1.-ushp[i].y * 2.;float w = ushp[i].z * 1.;float h = ushp[i].w * 2.;vec3 color = ushpcl[i].rgb;float opacity = abs(ushpcl[i].a);float rect = drwrct(vUv, vec2(w, h), vec2(x, y ));if (length(rects) == 0.) {rects += vec3(rect) * color * opacity;opaqueRects += vec3(rect) * color;}}if (opaqueRects != udkncl.rgb) {rects = vec3(0.);}vec3 c = vec3(rects);gl_FragColor = vec4(c, 1.);}`;const ye=(c=512)=>{const l=new THREE.WebGLRenderTarget(c,c,{minFilter:THREE.LinearFilter,magFilter:THREE.NearestFilter});return l.texture.wrapS=THREE.MirroredRepeatWrapping,l},Fe="vec3 snoiseVec3( vec3 x ){ float s = sn3d(vec3( #crlchnks )); float s1 = sn3d(vec3( #crlchnks1 )); float s2 = sn3d(vec3( #crlchnks2 )); vec3 c = vec3( #crlchnk1 ); return c;}vec3 crlnse( vec3 p ){ const float e = .1; vec3 dx = vec3( #curlExp0 , 0.0 , 0.0 ); vec3 dy = vec3( 0.0 , #curlExp1 , 0.0 ); vec3 dz = vec3( 0.0 , 0.0 , #curlExp2 ); vec3 p_x0 = snoiseVec3( p - dx ); vec3 p_x1 = snoiseVec3( p + dx ); vec3 p_y0 = snoiseVec3( p - dy ); vec3 p_y1 = snoiseVec3( p + dy ); vec3 p_z0 = snoiseVec3( p - dz ); vec3 p_z1 = snoiseVec3( p + dz ); float x = p_y1.z - p_y0.z - p_z1.y + p_z0.y; float y = p_z1.x - p_z0.x - p_x1.z + p_x0.z; float z = p_x1.y - p_x0.y - p_y1.x + p_y0.x; const float divisor = 1.0 / ( 2.0 * e ); return normalize( vec3( #crlchnk2 ) * divisor );}",We="vec3 fade(vec3 t) {return t*t*t*(t*(t*6.0-15.0)+10.0);}float pnoise3d(vec3 P, vec3 rep){vec3 Pi0 = mod(floor(P), rep);vec3 Pi1 = mod(Pi0 + vec3(1.0), rep);Pi0 = mod289(Pi0);Pi1 = mod289(Pi1);vec3 Pf0 = fract(P);vec3 Pf1 = Pf0 - vec3(1.0);vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);vec4 iy = vec4(Pi0.yy, Pi1.yy);vec4 iz0 = Pi0.zzzz;vec4 iz1 = Pi1.zzzz;vec4 ixy = permute(permute(ix) + iy);vec4 ixy0 = permute(ixy + iz0);vec4 ixy1 = permute(ixy + iz1);vec4 gx0 = ixy0 * (1.0 / 7.0);vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;gx0 = fract(gx0);vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);vec4 sz0 = step(gz0, vec4(0.0));gx0 -= sz0 * (step(0.0, gx0) - 0.5);gy0 -= sz0 * (step(0.0, gy0) - 0.5);vec4 gx1 = ixy1 * (1.0 / 7.0);vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;gx1 = fract(gx1);vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);vec4 sz1 = step(gz1, vec4(0.0));gx1 -= sz1 * (step(0.0, gx1) - 0.5);gy1 -= sz1 * (step(0.0, gy1) - 0.5);vec3 g000 = vec3(gx0.x,gy0.x,gz0.x);vec3 g100 = vec3(gx0.y,gy0.y,gz0.y);vec3 g010 = vec3(gx0.z,gy0.z,gz0.z);vec3 g110 = vec3(gx0.w,gy0.w,gz0.w);vec3 g001 = vec3(gx1.x,gy1.x,gz1.x);vec3 g101 = vec3(gx1.y,gy1.y,gz1.y);vec3 g011 = vec3(gx1.z,gy1.z,gz1.z);vec3 g111 = vec3(gx1.w,gy1.w,gz1.w);vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));g000 *= norm0.x;g010 *= norm0.y;g100 *= norm0.z;g110 *= norm0.w;vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));g001 *= norm1.x;g011 *= norm1.y;g101 *= norm1.z;g111 *= norm1.w;float n000 = dot(g000, Pf0);float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));float n111 = dot(g111, Pf1);vec3 fade_xyz = fade(Pf0);vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);return 2.2 * n_xyz;}",we="float sn3d(vec3 v){const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);vec3 i = floor(v + dot(v, C.yyy) );vec3 x0 = v - i + dot(i, C.xxx) ;vec3 g = step(x0.yzx, x0.xyz);vec3 l = 1.0 - g;vec3 i1 = min( g.xyz, l.zxy );vec3 i2 = max( g.xyz, l.zxy );vec3 x1 = x0 - i1 + C.xxx;vec3 x2 = x0 - i2 + C.yyy; vec3 x3 = x0 - D.yyy; i = mod289(i);vec4 p = permute( permute( permute(i.z + vec4(0.0, i1.z, i2.z, 1.0 ))+ i.y + vec4(0.0, i1.y, i2.y, 1.0 ))+ i.x + vec4(0.0, i1.x, i2.x, 1.0 ));float n_ = 0.142857142857;vec3 ns = n_ * D.wyz - D.xzx;vec4 j = p - 49.0 * floor(p * ns.z * ns.z);vec4 x_ = floor(j * ns.z);vec4 y_ = floor(j - 7.0 * x_ );vec4 x = x_ *ns.x + ns.yyyy;vec4 y = y_ *ns.x + ns.yyyy;vec4 h = 1.0 - abs(x) - abs(y);vec4 b0 = vec4( x.xy, y.xy );vec4 b1 = vec4( x.zw, y.zw );vec4 s0 = floor(b0)*2.0 + 1.0;vec4 s1 = floor(b1)*2.0 + 1.0;vec4 sh = -step(h, vec4(0.0));vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;vec3 p0 = vec3(a0.xy,h.x);vec3 p1 = vec3(a0.zw,h.y);vec3 p2 = vec3(a1.xy,h.z);vec3 p3 = vec3(a1.zw,h.w);vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));p0 *= norm.x;p1 *= norm.y;p2 *= norm.z;p3 *= norm.w;vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);m = m * m;return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),dot(p2,x2), dot(p3,x3) ) );}",Ae="float grain(vec2 texCoord, vec2 resolution, float frame, float mult