memoscan
← all memos

Memo 0x128c4deb…6073dc on Ethereum

me, uv).a, 0., 1., 50000., 100000.);\n float prevuvPertubX = ( ( texture(tCurl, vTexCoord + vec2(uTime*shakeSpeed)).r ) - .5 ) * 2. * prevPertubScl; // uTime * 10000 -> 100000\n float prevuvPertubY = ( ( texture(tCurl, vTexCoord + vec2(uTime*shakeSpeed)).g ) - .5 ) * 2. * prevPertubScl;\n \n \n vec2 prevScaleDir = vec2(prevuvPertubX, prevuvPertubY) * 1.2;\n float prevScaleComp = curl1.r + 0.0005;\n vec2 pushForce = mix(-uPushForce, uPushForce, curl2.r) * .1;\n vec2 prevScale = vec2(prevScaleComp, prevScaleComp * curl1.g) * pushForce;\n vec2 force1 = texture(tGradientMap, prevColor.rb).rb * 5.;\n vec2 force2 = curl2.rg * 1.02 * fit(curl1.b, 0., 1., .1, 1.);\n vec2 pivot = texture(tFlow1, uv * 1. + vec2(steppedUV.y, 0.)).rg * uPivotScl;\n vec2 prevuv = scale(uv, prevScale + prevScaleDir + force1 * force2, pivot );\n\n float prevuvMixFactorScl = .00005;\n float prevuvMixFactor = .000001 + texture(tPrevFrame, prevuv).a * prevuvMixFactorScl;\n\n // if (uRects[0].y < 1.) { prevuvMixFactor *= 0.; }\n\n prevuv = mix(uv, prevuv, prevuvMixFactor);\n prevuv = clamp(prevuv, 0., 1.);\n prevColor = texture(tPrevFrame, prevuv).rgb * 1.;\n float prevColorAlpha = texture(tPrevFrame, prevuv).a;\n\n vec2 center = vec2(0.5);\n\n // to accumulate\n vec3 color = vec3(0.);\n float alpha = 0.;\n \n float t = uTime + uTimeOffsets[0];\n \n // shape params\n float thickness = uRectsThickness[0] * .00025 * 1.;\n float size = uRects[0].z;\n \n float height = size;\n vec2 outerSize = vec2(size, height * screenRatio);\n vec2 innerSize = vec2(outerSize.x - thickness, outerSize.y - thickness );\n \n\n float x = uRects[0].x + outerSize.x/2.;\n float y = uRects[0].y + outerSize.y/2.;\n vec2 pos = vec2(x,y);\n pos -= vec2(0.5);\n \n vec2 st = uv;\n st -= pos;\n st -= center;\n st = rotate2d(uRotation) * st * vec2(1., 1.*screenRatio);\n st += center;\n\n // shape\n float smoothness = uSmoothness * 2.;\n float shape = rect(st, outerSize, smoothness);\n shape -= rect(st, innerSize, smoothness);\n\n float isCircle = curl1.r;\n if (isCircle > .0) {\n\n float circleSize = size * .5;//0.005;\n float circle = step( distance(uv, pos + center), circleSize);\n circle -= step( distance(uv, pos + center), circleSize * 0.5);\n }\n\n color = blendExclusion( color, vec3(shape), 1.);\n alpha += shape * fit(cos(t*200.), -1., 1., 0., 3.);\n\n // up mask\n float stopVariance = texture(tPerlin, uv * .1).g * .01;\n float eedge = .01;\n float stop = upMaskVal + stopVariance;\n float upMask = 1. - smoothstep(stop - eedge, stop + eedge, uv.y);\n color *= upMask;\n\n // blend with prev\n if (uBlendingMode == 6.) {\n color = blendDifference(prevColor, color, 1.);\n }\n else if (uBlendingMode == 16.) {\n color = blendNegation( prevColor, color, 1.);\n }\n alpha = prevColorAlpha + alpha;\n\n FragColor = vec4( color, alpha );\n\n // FragColor = texture(tFlow1, uv);\n}"},{}],6:[function(e,t,n){t.exports="#define GLSLIFY 1\nuniform float uSeed;\nuniform float uTime;\nuniform float uFboRes;\n\nin vec2 vTexCoord;\n\nout vec4 FragColor;\n\n<noisecommon>\n<snoise3d>\n<curl>\n\nvoid main() {\n\n vec2 freq = vec2(1., 1.)*1.3 * uFboRes;\n vec2 t = vec2(uTime*1000.)*.2;\n vec2 offset = vec2(uSeed*100.);\n vec3 curl = curlNoise( vec3(vTexCoord*freq+offset+t, uTime*100.) );\n float r = curl.r * curl.b;\n float g = curl.g;\n float b = curl.b;\n float a = (curlNoise(vec3((vTexCoord + vec2(uSeed*100.)) * 0.9, 0.)) * .01).r;\n\n vec3 color = vec3(r, g, curl.z);\n\n FragColor = vec4(color, a);\n\n}"},{}],7:[function(e,t,n){t.exports="#define GLSLIFY 1\nuniform float uSeed;\nuniform float uFboRes;\nuniform vec2 uFreq;\nuniform vec2 uOffset;\n\nin vec2 vTexCoord;\n\nout vec4 FragColor;\n\n<noisecommon>\n<snoise3d>\n<curl>\n<cell2d>\n\nvoid main() {\n\n vec2 uv = vTexCoord * vec2(1., 2.);\n\n vec2 freq = uFreq * uFboRes;\n vec3 curl = curlNoise(vec3(uv * freq + uOffset, 0.));\n\n float perlin = snoise3d(vec3(uv * 1000. + vec2(uSeed*100.), 0.));\n curl += vec3(perlin);\n\n vec2 cell = cell2d(uv*1.);\n curl += cell.r;\n \n vec3 color = curl;\n\n // color = vec3(cell, 0.);\n FragColor = vec4(color, 1.);\n \n}\n"},{}],8:[function(e,t,n){t.exports="#define GLSLIFY 1\nuniform float uSeed;\nuniform vec2 uResolution;\n\nin vec2 vTexCoord;\n\nout vec4 FragColor;\n\n<noisecommon>\n<snoise3d>\n<pnoise3d>\n<grain>\n\nvoid main() {\n\n float baseGrain = grain(vTexCoord+vec2(uSeed), vec2(10000.) * 2., 0.);\n float bgGrain = grain(vTexCoord, vec2(5500.) * 2., 0.);\n\n vec3 color = vec3(baseGrain, bgGrain, 0.);\n\n FragColor = vec4(color, 1.);\n\n}"},{}],9:[function(e,t,n){t.exports="#define GLSLIFY 1\nuniform float uSeed;\n\nin vec2 vTexCoord;\n\nout vec4 FragColor;\n\n<noisecommon>\n<snoise3d>\n\nvoid main() {\n\n // r\n float ampl = 10.;\n vec2 scl = vec2(200., 20.);\n float r = snoise3d( vec3(vTexCoord*scl+vec2(uSeed*10.), 0.));\n\n // g\n ampl = 1.;\n scl = vec2(20., 20.);\n float g = snoise3d( vec3(vTexCoord*scl+vec2(uSeed*10.), 0.));\n\n float b = snoise3d( vec3(vTexCoord+vec2(uSeed*10., 0.), 0.) * .35 );\n \n vec3 color = vec3(r, g, b);\n\n FragColor = vec4(color, 1.);\n\n}"},{}],10:[function(e,t,n){t.exports="#define GLSLIFY 1\nuniform sampler2D tTex;\nuniform sampler2D tGrain;\nuniform sampler2D tGradientMap;\nuniform sampler2D tPerlin;\nuniform sampler2D tCurl;\nuniform float uSeed;\nuniform vec2 uResolution;\n\nin vec2 vTexCoord;\n\nout vec4 FragColor;\n\n<math>\n<noisecommon>\n<snoise3d>\n<pnoise3d>\n<curl>\n<ptdepth>\n<grain>\n<blending>\n\nvoid main() {\n\n vec2 uv = gl_FragCoord.xy/uResolution;\n vec2 wrapuv = uv;\n\n vec3 tGrainCol = texture(tGrain, uv).rgb;\n \n vec3 curl = texture(tCurl, uv).aaa;\n float wrapuvOffsetY = curl.r;\n wrapuv.y += wrapuvOffsetY;\n\n vec4 tex = texture(tTex, wrapuv);\n vec3 color = tex.rgb;\n float alpha = tex.a;\n float baseGrain = tGrainCol.r;\n float bgGrain = tGrainCol.g;\n\n vec3 finalColor = texture(tTex, uv).rgb;\n\n finalColor = blendSoftLight(finalColor, vec3(baseGrain), .3);\n finalColor = blendAverage(finalColor, vec3(bgGrain), (1.-alpha) * .1);\n\n // perlin ptdepth\n float ptdepthRes = 2000.;\n float ptdepthThickness = 1.5;\n vec2 perlinCoords = wrapuv * vec2(2., 4.) * 2.;\n vec3 perlinptdepth = ptdepth(tPerlin, perlinCoords, ptdepthRes, ptdepthThickness);\n finalColor = blendOverlay(finalColor, perlinptdepth, -.155);\n\n // input ptdepth\n ptdepthRes = 4000.;\n ptdepthThickness = 5.;\n vec2 coords = wrapuv;\n vec3 inputptdepth = ptdepth(tTex, coords, ptdepthRes, ptdepthThickness);\n finalColor = blendAdd(finalColor, inputptdepth, .15 * alpha);\n\n // finer input ptdepth\n ptdepthRes = 8000.;\n ptdepthThickness = 3.2;\n vec3 finerInputptdepth = ptdepth(tTex, coords, ptdepthRes, -ptdepthThickness);\n\n // tint\n vec3 col = texture(tGradientMap, vec2(clamp(finalColor.r, 0., .99), 1.)).rgb;\n finalColor = mix(finalColor, col, 1.);\n\n finalColor = blendAdd(finalColor, finerInputptdepth, .625 * alpha);\n finalColor = blendExclusion( finalColor, perlinptdepth * texture(tGradientMap, vec2(0., 0.)).rgb, .5);\n\n // hashes grid\n float pertub = 0.;\n float yhashPertub = texture(tCurl, uv).r;\n float xhashOffset = (floor((uv.y*10.))/10.);\n float hashRes = 200.;\n float xhashes = smoothstep(.1, .15, fract((uv.x+xhashOffset * 20.) * hashRes*.5));\n float yhashes = smoothstep(.1, .15 + pertub * .3, fract(uv.y * hashRes + yhashPertub * .1 )) + .2;\n float hashes = xhashes * yhashes;\n finalColor = blendColorBurn(finalColor, vec3(hashes), 0.4 * (max(.1, 1.-alpha)) * max(.2, abs(curl.b) ));\n\n // finalColor = texture(tTex, uv).rgb;\n FragColor = vec4(finalColor, 1.);\n}"},{}],11:[function(e,t,n){t.exports="#define GLSLIFY 1\nin vec2 aPosition;\nin vec2 aTexCoord;\n\nout vec2 vTexCoord;\n\nvoid main() {\n gl_Position = vec4(aPosition, 0., 1.);\n\n vTexCoord = aTexCoord;\n}"},{}],12:[function(e,t,n){t.exports="#define GLSLIFY 1\nfloat blendReflect(float base, float blend) {return (blend==1.0)?blend:min(base*base/(1.0-blend),1.0);}\nvec3 blendReflect(vec3 base, vec3 blend) {return vec3(blendReflect(base.r,blend.r),blendReflect(base.g,blend.g),blendReflect(base.b,blend.b));}\nvec3 blendReflect(vec3 base, vec3 blend, float opacity) {return (blendReflect(base, blend) * opacity + base * (1.0 - opacity));}\n\nfloat blendOverlay(float base, float blend) {return base<0.5?(2.0*base*blend):(1.0-2.0*(1.0-base)*(1.0-blend));}\nvec3 blendOverlay(vec3 base, vec3 blend) {return vec3(blendOverlay(base.r,blend.r),blendOverlay(base.g,blend.g),blendOverlay(base.b,blend.b));}\nvec3 blendOverlay(vec3 base, vec3 blend, float opacity) {return (blendOverlay(base, blend) * opacity + base * (1.0 - opacity));}\n\nfloat blendColorBurn(float base, float blend) {return (blend==0.0)?blend:max((1.0-((1.0-base)/blend)),0.0);}\nvec3 blendColorBurn(vec3 base, vec3 blend) {return vec3(blendColorBurn(base.r,blend.r),blendColorBurn(base.g,blend.g),blendColorBurn(base.b,blend.b));}\nvec3 blendColorBurn(vec3 base, vec3 blend, float opacity) {return (blendColorBurn(base, blend) * opacity + base * (1.0 - opacity));}\n\nfloat blendColorDodge(float base, float blend) {return (blend==1.0)?blend:min(base/(1.0-blend),1.0);}\nvec3 blendColorDodge(vec3 base, vec3 blend) {return vec3(blendColorDodge(base.r,blend.r),blendColorDodge(base.g,blend.g),blendColorDodge(base.b,blend.b));}\nvec3 blendColorDodge(vec3 base, vec3 blend, float opacity) {return (blendColorDodge(base, blend) * opacity + base * (1.0 - opacity));}\n\nfloat blendVividLight(float base, float blend) {return (blend<0.5)?blendColorBurn(base,(2.0*blend)):blendColorDodge(base,(2.0*(blend-0.5)));}\nvec3 blendVividLight(vec3 base, vec3 blend) {return vec3(blendVividLight(base.r,blend.r),blendVividLight(base.g,blend.g),blendVividLight(base.b,blend.b));}\nvec3 blendVividLight(vec3 base, vec3 blend, float opacity) {return (blendVividLight(base, blend) * opacity + base * (1.0 - opacity));}\n\nfloat blendAdd(float base, float blend){return min(base+blend,1.0);}\nvec3 blendAdd(vec3 base, vec3 blend){return min(base+blend,vec3(1.0));}\nvec3 blendAdd(vec3 base, vec3 blend, float opacity){return (blendAdd(base, blend) * opacity + base *