{"history":[{"breakpoints":[],"visible":true,"aspectRatio":1,"userDownsample":0.25,"layerType":"effect","type":"gradient","usesPingPong":false,"texture":false,"animating":true,"mouseMomentum":0,"mouseSpring":0,"isMask":0,"compiledFragmentShaders":["#version 300 es\nprecision highp float;in vec2 vTextureCoord;uniform float uTime;\nuniform vec2 uMousePos;uvec2 pcg2d(uvec2 v) {\nv = v * 1664525u + 1013904223u;\nv.x += v.y * v.y * 1664525u + 1013904223u;\nv.y += v.x * v.x * 1664525u + 1013904223u;\nv ^= v >> 16;\nv.x += v.y * v.y * 1664525u + 1013904223u;\nv.y += v.x * v.x * 1664525u + 1013904223u;\nreturn v;\n}float randFibo(vec2 p) {\nuvec2 v = floatBitsToUint(p);\nv = pcg2d(v);\nuint r = v.x ^ v.y;\nreturn float(r) / float(0xffffffffu);\n}float deband() {\nreturn (randFibo(gl_FragCoord.xy) - 0.5) / 255.0;\n}vec3 getColor(int index) {\nswitch(index) {\ncase 0: return vec3(0, 0, 0);\ncase 1: return vec3(0, 0, 0);\ncase 2: return vec3(0.9411764705882353, 0.9411764705882353, 0.9411764705882353);\ncase 3: return vec3(0.7176470588235294, 0.7176470588235294, 0.7176470588235294);\ncase 4: return vec3(0, 0, 0);\ndefault: return vec3(0.0);\n}\n}float getStop(int index) {\nswitch(index) {\ncase 0: return 0.0000;\ncase 1: return 0.6031;\ncase 2: return 0.8750;\ncase 3: return 0.9219;\ncase 4: return 1.0000;\ndefault: return 0.0;\n}\n}const float PI = 3.14159265359;vec2 rotate(vec2 coord, float angle) {\nfloat s = sin(angle);\nfloat c = cos(angle);\nreturn vec2(\ncoord.x * c - coord.y * s,\ncoord.x * s + coord.y * c\n);\n}vec3 linear_from_srgb(vec3 rgb) {\nreturn pow(max(rgb, vec3(0.0)), vec3(2.2));\n}vec3 srgb_from_linear(vec3 lin) {\nreturn pow(max(lin, vec3(0.0)), vec3(1.0/2.2));\n}vec3 safeCbrt(vec3 v) {\nreturn sign(v) * pow(abs(v), vec3(1.0/3.0));\n}vec3 oklab_mix(vec3 lin1, vec3 lin2, float a) {\nconst mat3 kCONEtoLMS = mat3(\n0.4121656120, 0.2118591070, 0.0883097947,\n0.5362752080, 0.6807189584, 0.2818474174,\n0.0514575653, 0.1074065790, 0.6302613616);\nconst mat3 kLMStoCONE = mat3(\n4.0767245293, -1.2681437731, -0.0041119885,\n-3.3072168827, 2.6093323231, -0.7034763098,\n0.2307590544, -0.3411344290, 1.7068625689);\nvec3 lms1 = safeCbrt( kCONEtoLMS*lin1 );\nvec3 lms2 = safeCbrt( kCONEtoLMS*lin2 );\nvec3 lms = mix( lms1, lms2, a );\nlms *= 1.0 + 0.025 * a * (1.0-a);\nreturn kLMStoCONE * (lms * lms * lms);\n}vec3 getGradientColor(float position) {\nposition = clamp(position, 0.0, 1.0);\nif (5 <= 1) return getColor(0);int count = 5 - 1;for (int i = 0; i < 15; i++) {\nif (i >= count) break;\nfloat stopA = getStop(i);\nfloat stopB = getStop(i + 1);\nif (position <= stopB || i == count - 1) {\nfloat denom = max(stopB - stopA, 0.00001);\nfloat t = clamp((position - stopA) / denom, 0.0, 1.0);\nvec3 linA = linear_from_srgb(getColor(i));\nvec3 linB = linear_from_srgb(getColor(i + 1));\nvec3 mixed = oklab_mix(linA, linB, t);\nreturn srgb_from_linear(mixed);\n}\n}\nreturn getColor(min(count, 15));\n}out vec4 fragColor;vec3 applyColorToPosition(float position) {\nvec3 color = vec3(0);\nposition -= (uTime * 0.01 + 0.4000);\nfloat cycle = floor(position);\nbool reverse = 0.0000 > 0.5 && int(cycle) % 2 == 0;\nfloat animatedPos = reverse ? 1.0 - fract(position) : fract(position);color = getGradientColor(animatedPos);\nfloat dither = deband();\ncolor += dither;\nreturn color;\n}vec3 radialGrad(vec2 uv) {\nfloat position = length(uv);\nreturn applyColorToPosition(position);\n}vec3 getGradient(vec2 uv) {\nreturn radialGrad(uv);\n}vec3 getBgColor(vec2 uv) {return getGradient(uv);return vec3(0, 0, 0);\n}void main() {vec2 uv = vTextureCoord;\nvec2 pos = vec2(0.5, 0.5) + mix(vec2(0), (uMousePos-0.5), 0.0000);\nuv -= pos;\nuv /= max(0.2600*2., 1e-5);\nuv = rotate(uv, (0.3915 - 0.5) * 2. * PI);\nvec4 color = vec4(getBgColor(uv), 1.0000);\nfragColor = color;\n}"],"compiledVertexShaders":["#version 300 es\nprecision mediump float;in vec3 aVertexPosition;\nin vec2 aTextureCoord;uniform mat4 uMVMatrix;\nuniform mat4 uPMatrix;out vec2 vTextureCoord;\nout vec3 vVertexPosition;void main() {\ngl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);\nvTextureCoord = aTextureCoord;\n}"],"speed":0.36,"trackMouse":0,"trackAxes":"xy","data":{"depth":false,"uniforms":{},"isBackground":true},"id":"gradient"},{"layerType":"flattened","id":"flat_1","compiledFragmentShaders":["#version 300 es\nprecision highp float;\nin vec2 vTextureCoord;\nin vec3 vVertexPosition;\n\nuniform sampler2D uBgTexture;\nuniform float uL0_Time;\nuniform vec2 uMousePos;\nuniform vec2 uResolution;\nuniform float uL0_ElemOpacity;\nuniform float uL1_Time;\nuniform float uL1_ElemOpacity;\n\nconst float PI = 3.14159265359;\nconst float TAU = 6.28318530718;\nconst float TWO_PI_L1 = 2.0 * PI;\n\nout vec4 fragColor;\n\nvec4 permute_L0(vec4 t) {\nreturn t * (t * 34.0 + 133.0);\n}\nvec3 grad_L0(float hash) {\nvec3 cube = mod(floor(hash / vec3(1.0, 2.0, 4.0)), 2.0) * 2.0 - 1.0;\nvec3 cuboct = cube;\nfloat index0 = step(0.0, 1.0 - floor(hash / 16.0));\nfloat index1 = step(0.0, floor(hash / 16.0) - 1.0);\ncuboct.x *= 1.0 - index0;\ncuboct.y *= 1.0 - index1;\ncuboct.z *= 1.0 - (1.0 - index0 - index1);\nfloat type = mod(floor(hash / 8.0), 2.0);\nvec3 rhomb = (1.0 - type) * cube + type * (cuboct + cross(cube, cuboct));\nvec3 grad_L0 = cuboct * 1.22474487139 + rhomb;\ngrad_L0 *= (1.0 - 0.042942436724648037 * type) * 3.5946317686139184;\nreturn grad_L0;\n}\nvec4 bccNoiseDerivativesPart_L0(vec3 X) {\nvec3 b = floor(X);\nvec4 i4 = vec4(X - b, 2.5);\nvec3 v1 = b + floor(dot(i4, vec4(.25)));\nvec3 v2 = b + vec3(1, 0, 0) + vec3(-1, 1, 1) * floor(dot(i4, vec4(-.25, .25, .25, .35)));\nvec3 v3 = b + vec3(0, 1, 0) + vec3(1, -1, 1) * floor(dot(i4, vec4(.25, -.25, .25, .35)));\nvec3 v4 = b + vec3(0, 0, 1) + vec3(1, 1, -1) * floor(dot(i4, vec4(.25, .25, -.25, .35)));\nvec4 hashes = permute_L0(mod(vec4(v1.x, v2.x, v3.x, v4.x), 289.0));\nhashes = permute_L0(mod(hashes + vec4(v1.y, v2.y, v3.y, v4.y), 289.0));\nhashes = mod(permute_L0(mod(hashes + vec4(v1.z, v2.z, v3.z, v4.z), 289.0)), 48.0);\nvec3 d1 = X - v1;\nvec3 d2 = X - v2;\nvec3 d3 = X - v3;\nvec3 d4 = X - v4;\nvec4 a = max(0.75 - vec4(dot(d1, d1), dot(d2, d2), dot(d3, d3), dot(d4, d4)), 0.0);\nvec4 aa = a * a;\nvec4 aaaa = aa * aa;\nvec3 g1 = grad_L0(hashes.x);\nvec3 g2 = grad_L0(hashes.y);\nvec3 g3 = grad_L0(hashes.z);\nvec3 g4 = grad_L0(hashes.w);\nvec4 extrapolations = vec4(dot(d1, g1), dot(d2, g2), dot(d3, g3), dot(d4, g4));\nvec3 derivative = -8.0 * mat4x3(d1, d2, d3, d4) * (aa * a * extrapolations)\n+ mat4x3(g1, g2, g3, g4) * aaaa;\nreturn vec4(derivative, dot(aaaa, extrapolations));\n}\nvec4 bccNoiseDerivatives_XYBeforeZ_L0(vec3 X) {\nmat3 orthonormalMap = mat3(\n0.788675134594813, -0.211324865405187, -0.577350269189626,\n-0.211324865405187, 0.788675134594813, -0.577350269189626,\n0.577350269189626, 0.577350269189626, 0.577350269189626);\nX = orthonormalMap * X;\nvec4 result = bccNoiseDerivativesPart_L0(X) + bccNoiseDerivativesPart_L0(X + 144.5);\nreturn vec4(result.xyz * orthonormalMap, result.w);\n}\nfloat ease_L0 (int easingFunc, float t) {\nreturn t;\n}\nvec3 blend_L0 (int blendMode, vec3 src, vec3 dst) {\nreturn src - dst;\n}\nvec4 normalizeNoise_L0(vec4 noise, float amount) {\nreturn mix(noise, (noise + 0.5) * 0.5, amount);\n}\nmat2 rotate2d_L0(float angle) {\nreturn mat2(cos(angle), -sin(angle), sin(angle), cos(angle));\n}\nvec4 getNoise_L0(vec3 p) {\nvec4 noise = bccNoiseDerivatives_XYBeforeZ_L0(p);\nreturn normalizeNoise_L0(noise, 0.6400);\n}\nvec3 causticsP_L0(vec2 uv, vec2 aspect) {\nvec2 drift = vec2(0, 0.0000 * uL0_Time * 0.0125);\nvec2 pos = vec2(0.5, 0.5) + drift * rotate2d_L0(0.0000 * -2. * PI);\nuv -= pos;\nuv = uv * aspect * rotate2d_L0(0.0000 * 2. * PI) * vec2(1. - 0.0000, 1.) * 16.0 * 0.3000;\nreturn vec3(uv, uL0_Time * 0.05);\n}\nvec3 causticsColor_L0(vec3 p, vec4 noise) {\nfloat refraction = mix(0.25, 1.3, 0.6600);\nvec4 balanceNoise = getNoise_L0(p - vec3(noise.xyz / 32.0) * refraction);\nnoise = getNoise_L0(p - vec3(balanceNoise.xyz / 16.0) * refraction);\nfloat balancer = (0.5 + 0.5 * balanceNoise.w);\nfloat normalized = pow(0.5 + 0.5 * noise.w, 2.);\nreturn vec3(1, 1, 1) * mix(0., normalized + 0.2 * (1.0 - normalized), balancer);\n}\nvec3 blend_L1 (int blendMode, vec3 src, vec3 dst) {\nreturn 1. - (1. - src) * (1. - dst);\n}\nuvec2 pcg2d_L1(uvec2 v) {\nv = v * 1664525u + 1013904223u;\nv.x += v.y * v.y * 1664525u + 1013904223u;\nv.y += v.x * v.x * 1664525u + 1013904223u;\nv ^= v >> 16;\nv.x += v.y * v.y * 1664525u + 1013904223u;\nv.y += v.x * v.x * 1664525u + 1013904223u;\nreturn v;\n}\nfloat randFibo_L1(vec2 p) {\nuvec2 v = floatBitsToUint(p);\nv = pcg2d_L1(v);\nuint r = v.x ^ v.y;\nreturn float(r) / float(0xffffffffu);\n}\nfloat deband_L1() {\nreturn (randFibo_L1(gl_FragCoord.xy) - 0.5) / 255.0;\n}\nvec3 Tonemap_tanh_L1(vec3 x) {\nx = clamp(x, -40.0, 40.0);\nreturn (exp(x) - exp(-x)) / (exp(x) + exp(-x));\n}\nfloat luma_L1(vec3 color) {\nreturn dot(color, vec3(0.299, 0.587, 0.114));\n}\nfloat drawViewportEdges_L1(vec2 uv, float thickness) {\nfloat distToEdge = min(min(uv.x, uv.y), min(1.0 - uv.x, 1.0 - uv.y));\nfloat sdf = distToEdge;\nfloat glowThickness = thickness * 0.8;\nfloat glow = glowThickness / max(0.0001, 1.0 - smoothstep(0.12, 0.01, abs(sdf) + 0.02));\nreturn glow * pow(1.0-abs(sdf), 3.0);\n}\nfloat getBeam_L1(vec2 uv, vec2 pos, float radius, float angleVal, float skewVal, float thickness, float time, float phaseVal, vec2 resolution) {\nreturn drawViewportEdges_L1(uv, thickness);\n}\n\nvec4 computeLayer_L0(vec2 uv) {\nvec2 aspect = vec2(uResolution.x/uResolution.y, 1);\nvec2 mPos = vec2(0.5, 0.5) + mix(vec2(0), (uMousePos-0.5), 0.0000);\nfloat mDist = ease_L0(0, max(0.,1. - distance(uv * aspect, mPos * aspect) * 4. * (1. - 1.0000)));\nvec3 causticP = causticsP_L0(uv, aspect);\nvec4 causticNoise = getNoise_L0(causticP) * mDist;\nvec3 causticColor = causticsColor_L0(causticP, causticNoise) * mDist;\nvec4 color;\ncolor = texture(uBgTexture, uv + causticNoise.xy * 0.01 * 1.0000);\nvec3 blended = blend_L0(2, color.rgb, causticColor);\ncolor.rgb = mix(color.rgb, blended, 1.0000);\nreturn color;\n}\nvec4 computeLayer_L1(vec2 uv, vec4 prevLayerColor, float sharedDither) {\nvec4 bg = prevLayerColor;\nvec2 pos = vec2(0.5, 0.5) + mix(vec2(0), (uMousePos-0.5), 0.0000);\nfloat beam = getBeam_L1(uv, pos, 0.4300, 0.0000, 0.5000, 0.2300, uL1_Time, 0.5000, uResolution);\nvec3 beamColor = beam * vec3(0.27450980392156865, 0.27450980392156865, 0.27450980392156865);\nfloat ssBeam = beam / (beam + 1.0);\nbeamColor = mix(beamColor, vec3(0.27450980392156865, 0.27450980392156865, 0.27450980392156865), mix(1.0, ssBeam, 0.0000)) * beam;\nfloat dither = sharedDither;\nvec3 result = Tonemap_tanh_L1(beamColor);\nfloat lum = luma_L1(beamColor);\nresult += dither;\nfloat layerMix = 1.0000;\nvec4 color;\nvec3 blended = blend_L1(4, result, bg.rgb);\ncolor = vec4(blended, 1.0) * layerMix;\nreturn color;\n}\n\nvoid main() {\nvec2 uv = vTextureCoord;\nfloat sharedDither = deband_L1();\nvec4 result = vec4(0.0);\nvec4 c0 = computeLayer_L0(uv);\nc0 *= uL0_ElemOpacity;\nresult = c0 + result * (1.0 - c0.a);\nvec4 c1 = computeLayer_L1(uv, clamp(result + texture(uBgTexture, uv) * (1.0 - clamp(result.a, 0.0, 1.0)), 0.0, 1.0), sharedDither);\nc1 *= uL1_ElemOpacity;\nresult = c1 + result * (1.0 - c1.a);\nfragColor = result;\n}"],"compiledVertexShaders":["#version 300 es\nprecision highp float;\nin vec3 aVertexPosition;\nin vec2 aTextureCoord;\nuniform mat4 uMVMatrix;\nuniform mat4 uPMatrix;\nout vec2 vTextureCoord;\nout vec3 vVertexPosition;\nvoid main() {\ngl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);\nvVertexPosition = aVertexPosition;\nvTextureCoord = aTextureCoord;\n}"],"sublayers":[{"id":"caustics","layerType":"effect","type":"caustics","sublayerIndex":0,"opacity":1,"animating":true},{"id":"beam","layerType":"effect","type":"beam","sublayerIndex":1,"opacity":1,"animating":false}],"data":{"uniforms":{"resolution":{"name":"uResolution","type":"2f","value":{"type":"Vec2","_x":1080,"_y":1080}},"mousePos":{"name":"uMousePos","type":"2f","value":{"type":"Vec2","_x":0.5,"_y":0.5}},"L0_time":{"name":"uL0_Time","type":"1f","value":0},"L0_elemOpacity":{"name":"uL0_ElemOpacity","type":"1f","value":1},"L1_time":{"name":"uL1_Time","type":"1f","value":0},"L1_elemOpacity":{"name":"uL1_ElemOpacity","type":"1f","value":1}},"textures":[],"timeUniforms":[{"key":"L0_time","speed":0.5,"animating":true}],"mouseUniforms":[],"hasMouseTracking":false,"hasVideoSublayers":false,"estimatedSublayerWorkRaw":26.25,"occlusion":{"candidateLayers":0}},"states":{"appear":[],"scroll":[],"hover":[],"mousemove":[]},"breakpoints":[],"userDownsample":1,"visible":true},{"breakpoints":[],"visible":true,"aspectRatio":1,"userDownsample":0.5,"layerType":"effect","type":"mouseDraw","usesPingPong":true,"texture":false,"animating":false,"mouseMomentum":0.29,"mouseSpring":0,"isMask":0,"compiledFragmentShaders":["#version 300 es\nprecision highp float;\nprecision highp int;in vec2 vTextureCoord;\nin vec3 vVertexPosition;uniform sampler2D uTexture;\nuniform sampler2D uPingPongTexture;uniform sampler2D uMaskTexture;\nuniform int uIsMask;\nuniform vec2 uMousePos;\nuniform float uParentTrackMouse;vec3 blend (int blendMode, vec3 src, vec3 dst) {\nreturn 1. - (1. - src) * (1. - dst);\n}uvec2 pcg2d(uvec2 v) {\nv = v * 1664525u + 1013904223u;\nv.x += v.y * v.y * 1664525u + 1013904223u;\nv.y += v.x * v.x * 1664525u + 1013904223u;\nv ^= v >> 16;\nv.x += v.y * v.y * 1664525u + 1013904223u;\nv.y += v.x * v.x * 1664525u + 1013904223u;\nreturn v;\n}float randFibo(vec2 p) {\nuvec2 v = floatBitsToUint(p);\nv = pcg2d(v);\nuint r = v.x ^ v.y;\nreturn float(r) / float(0xffffffffu);\n}float deband() {\nreturn (randFibo(gl_FragCoord.xy) - 0.5) / 255.0;\n}const float PI = 3.14159265359;out vec4 fragColor;vec3 rgb2hsv(vec3 c) {\nvec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\nvec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));\nvec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));float d = q.x - min(q.w, q.y);\nfloat e = 1.0e-10;\nreturn vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);\n}vec2 angleToDir(float angle) {\nfloat rad = angle * 2.0 * PI;\nreturn vec2(cos(rad), sin(rad));\n}void main() {\nvec2 uv = vTextureCoord;\nvec2 pingpongUv = uv;vec3 mouseRgb = texture(uPingPongTexture, pingpongUv).rgb;\nvec3 mouseTrail = rgb2hsv(mouseRgb);\nfloat angle = mouseTrail.x;\nfloat strength = mouseTrail.z * 0.4800 * 5.0;vec2 direction = angleToDir(angle);vec4 bg = texture(uTexture, uv - direction * 0.1 * strength * 0.3900);\nvec4 color = vec4(0,0,0,1);float dither = deband();\ncolor.rgb = vec3(strength * mix(mouseRgb, vec3(0.9333333333333333, 0.9333333333333333, 0.9333333333333333), 1.0000)) + dither;\nvec3 blendedRgb = blend(4, color.rgb, bg.rgb);\ncolor = vec4(mix(bg.rgb, blendedRgb, mouseTrail.z), 1.0);\nif(uIsMask == 1) {\nvec2 maskPos = mix(vec2(0), (uMousePos - 0.5), uParentTrackMouse);\nvec4 maskColor = texture(uMaskTexture, vTextureCoord - maskPos);\ncolor = color * (maskColor.a * maskColor.a);\n}\nfragColor = color;}","#version 300 es\nprecision highp float;in vec3 vVertexPosition;\nin vec2 vTextureCoord;uniform sampler2D uPingPongTexture;\nuniform vec2 uPreviousMousePos;\nuniform float uTime;uniform vec2 uMousePos;\nuniform vec2 uResolution;const float PI = 3.14159265359;\nconst float TAU = 6.28318530718;out vec4 fragColor;vec3 toLinear(vec3 c) { return c * c; }\nvec3 toGamma(vec3 c) { return sqrt(c); }vec3 hsv2rgb(vec3 c) {\nvec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\nvec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\nreturn c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}vec3 rgb2hsv(vec3 c) {\nvec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\nvec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));\nvec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));float d = q.x - min(q.w, q.y);\nfloat e = 1.0e-10;\nreturn vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);\n}mat2 rot(float a) {\nfloat s = sin(a), c = cos(a);\nreturn mat2(c, -s, s, c);\n}vec2 angleToDir(float angle) {\nfloat rad = angle * 2.0 * PI;\nreturn vec2(cos(rad), sin(rad));\n}vec2 liquify(vec2 st, vec2 dir, float aspectRatio) {\nst.x *= aspectRatio;\nfloat amplitude = 0.004;\nfloat freq = 6.;\nfor (float i = 1.0; i <= 3.0; i++) {\nst = st * rot(i / 3.0 * PI * 2.0);\nst += vec2(\namplitude * cos(i * freq * st.y + uTime * 0.02 * dir.x),\namplitude * sin(i * freq * st.x + uTime * 0.02 * dir.y)\n);\n}\nst.x /= aspectRatio;\nreturn st;\n}float trailIntensity(vec2 segStart, vec2 correctedUv, vec2 scaledDir, float segLen, float aspectRatio, float radius, float bloomExp) {\nvec2 posToUv = (correctedUv - segStart) * vec2(aspectRatio, 1.0);\nfloat projection = clamp(dot(posToUv, scaledDir), 0.0, segLen);\nvec2 closestPoint = segStart * vec2(aspectRatio, 1.0) + scaledDir * projection;float distToLine = length(correctedUv - closestPoint);\nfloat s = (1.0 + radius) / (distToLine + radius) * radius;return s;\n}void main() {\nfloat aspectRatio = uResolution.x / uResolution.y;\nvec2 uv = vTextureCoord;\nvec2 correctedUv = uv * vec2(aspectRatio, 1.0);vec3 lastFrameColor = texture(uPingPongTexture, uv).rgb;vec3 hsv = rgb2hsv(lastFrameColor);\nfloat prevStrength = hsv.z * hsv.z;\nvec2 prevDir = angleToDir(hsv.x);\nvec2 mouseVec = uMousePos - uPreviousMousePos;\nfloat mouseLen = length(mouseVec);\nvec2 dir = mouseVec * vec2(aspectRatio, 1.0);\nfloat dist = length(dir);float blurAmount = 0.03 * prevStrength;\nuv = uv - prevDir * blurAmount;if(prevStrength > 0.0) {\nuv = mix(uv, liquify(uv - prevDir * 0.005, prevDir, aspectRatio), (1.0 - prevStrength) * 0.7700);\n}lastFrameColor = toLinear(texture(uPingPongTexture, uv).rgb);float clampedDist = 0.0;\nvec3 trailColor = vec3(0.0);if (dist > 0.001) {\nvec2 normDir = mouseVec / mouseLen;\nvec2 scaledDir = normDir * vec2(aspectRatio, 1.0);float angle = atan(dir.y, dir.x);\nif (angle < 0.0) angle += TAU;\nvec3 pointColor = toLinear(hsv2rgb(vec3(angle / TAU, 1.0, 1.0)));\nfloat bloomExp = abs(10.0 * (1.0 - 0.6900 + 0.1));int numPoints = int(max(6.0, dist * 24.0));\nfloat speedFactor = clamp(dist, 0.7, 1.3);\nfloat radius = mix(0.1, 0.7, 0.4500 * speedFactor);float segLenAspect = mouseLen * aspectRatio / float(numPoints);\nfloat totalIntensity = 0.0;\nint iter = min(numPoints, 16);totalIntensity += trailIntensity(uPreviousMousePos, correctedUv, scaledDir, 0.0, aspectRatio, radius, bloomExp);for (int i = 1; i <= iter; i++) {\nfloat t = float(i - 1) / float(numPoints);\nvec2 segStart = mix(uPreviousMousePos, uMousePos, t);\ntotalIntensity += trailIntensity(segStart, correctedUv, scaledDir, segLenAspect, aspectRatio, radius, bloomExp);\n}trailColor = pointColor * totalIntensity / float(min(numPoints, 50) + 1);\ntrailColor = pow(trailColor, vec3(bloomExp));\nclampedDist = clamp(length(trailColor) * dist, 0.0, 1.0);\n}float blurRadius = 0.005;vec3 blurredLastFrame = lastFrameColor * 0.2;\nblurredLastFrame += toLinear(texture(uPingPongTexture, uv + vec2(blurRadius, 0.0)).rgb) * 0.2;\nblurredLastFrame += toLinear(texture(uPingPongTexture, uv + vec2(-blurRadius, 0.0)).rgb) * 0.2;\nblurredLastFrame += toLinear(texture(uPingPongTexture, uv + vec2(0.0, blurRadius)).rgb) * 0.2;\nblurredLastFrame += toLinear(texture(uPingPongTexture, uv + vec2(0.0, -blurRadius)).rgb) * 0.2;blurredLastFrame *= pow(abs(0.9200), 0.2);\nvec3 draw = mix(blurredLastFrame, trailColor, clampedDist);\ndraw = toGamma(draw);\ndraw = max(draw - 0.01, vec3(0.0));fragColor = vec4(draw, 1.0);\n}"],"compiledVertexShaders":["#version 300 es\nprecision mediump float;in vec3 aVertexPosition;\nin vec2 aTextureCoord;uniform mat4 uMVMatrix;\nuniform mat4 uPMatrix;\nuniform mat4 uTextureMatrix;out vec2 vTextureCoord;\nout vec3 vVertexPosition;void main() {\ngl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);\nvTextureCoord = (uTextureMatrix * vec4(aTextureCoord, 0.0, 1.0)).xy;\n}","#version 300 es\nprecision mediump float;in vec3 aVertexPosition;\nin vec2 aTextureCoord;uniform mat4 uMVMatrix;\nuniform mat4 uPMatrix;out vec2 vTextureCoord;\nout vec3 vVertexPosition;void main() {\ngl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);\nvTextureCoord = aTextureCoord;\n}"],"trackMouse":0,"trackAxes":"xy","data":{"depth":false,"uniforms":{},"isBackground":false},"id":"light_trail"},{"layerType":"flattened","id":"flat_4","compiledFragmentShaders":["#version 300 es\nprecision highp float;\nin vec2 vTextureCoord;\nin vec3 vVertexPosition;\n\nuniform sampler2D uBgTexture;\nuniform vec2 uResolution;\nuniform float uL0_ElemOpacity;\nuniform float uL1_Time;\nuniform float uL1_ElemOpacity;\n\nconst float TAU = 6.28318530718;\n\nout vec4 fragColor;\n\nvec3 blend_L0 (int blendMode, vec3 src, vec3 dst) {\nreturn src * dst;\n}\nmat2 rot_L0(float a) {\nreturn mat2(cos(a),-sin(a),sin(a),cos(a));\n}\nvec3 getColor_L1(int index) {\nswitch(index) {\ncase 0: return vec3(0.00392156862745098, 0.00392156862745098, 0.00784313725490196);\ncase 1: return vec3(0.027450980392156862, 0.2, 0.13333333333333333);\ncase 2: return vec3(0.3176470588235294, 1, 0.7294117647058823);\ncase 3: return vec3(0.13333333333333333, 1, 0.6549019607843137);\ndefault: return vec3(0.0);\n}\n}\nfloat getStop_L1(int index) {\nswitch(index) {\ncase 0: return 0.0000;\ncase 1: return 0.6438;\ncase 2: return 0.8187;\ncase 3: return 1.0000;\ndefault: return 0.0;\n}\n}\nuvec2 pcg2d_L1(uvec2 v) {\nv = v * 1664525u + 1013904223u;\nv.x += v.y * v.y * 1664525u + 1013904223u;\nv.y += v.x * v.x * 1664525u + 1013904223u;\nv ^= v >> 16;\nv.x += v.y * v.y * 1664525u + 1013904223u;\nv.y += v.x * v.x * 1664525u + 1013904223u;\nreturn v;\n}\nfloat randFibo_L1(vec2 p) {\nuvec2 v = floatBitsToUint(p);\nv = pcg2d_L1(v);\nuint r = v.x ^ v.y;\nreturn float(r) / float(0xffffffffu);\n}\nfloat deband_L1() {\nreturn (randFibo_L1(gl_FragCoord.xy) - 0.5) / 255.0;\n}\nfloat luma_L1(vec3 color) {\nreturn dot(color, vec3(0.299, 0.587, 0.114));\n}\nvec3 linear_from_srgb_L1(vec3 rgb) {\nreturn pow(max(rgb, vec3(0.0)), vec3(2.2));\n}\nvec3 srgb_from_linear_L1(vec3 lin) {\nreturn pow(max(lin, vec3(0.0)), vec3(1.0/2.2));\n}\nvec3 safeCbrt_L1(vec3 v) {\nreturn sign(v) * pow(abs(v), vec3(1.0/3.0));\n}\nvec3 oklab_mix_L1(vec3 lin1, vec3 lin2, float a) {\nconst mat3 kCONEtoLMS = mat3(\n0.4121656120, 0.2118591070, 0.0883097947,\n0.5362752080, 0.6807189584, 0.2818474174,\n0.0514575653, 0.1074065790, 0.6302613616);\nconst mat3 kLMStoCONE = mat3(\n4.0767245293, -1.2681437731, -0.0041119885,\n-3.3072168827, 2.6093323231, -0.7034763098,\n0.2307590544, -0.3411344290, 1.7068625689);\nvec3 lms1 = safeCbrt_L1(kCONEtoLMS*lin1);\nvec3 lms2 = safeCbrt_L1(kCONEtoLMS*lin2);\nvec3 lms = mix(lms1, lms2, a);\nlms *= 1.0 + 0.02 * a * (1.0 - a);\nreturn kLMStoCONE*(lms*lms*lms);\n}\nvec3 getGradientColor_L1(float position) {\nposition = clamp(position, 0.0, 1.0);\nint count = 4 - 1;\nfor (int i = 0;\ni < count;\ni++) {\nfloat colorPosition = getStop_L1(i);\nfloat nextColorPosition = getStop_L1(i + 1);\nif (position <= nextColorPosition) {\nfloat stopDelta = nextColorPosition - colorPosition;\nfloat mixFactor = clamp(stopDelta > 0.0001 ? (position - colorPosition) / stopDelta : 0.0, 0.0, 1.0);\nvec3 linStart = linear_from_srgb_L1(getColor_L1(i));\nvec3 linEnd = linear_from_srgb_L1(getColor_L1(i + 1));\nvec3 mixedLin = oklab_mix_L1(linStart, linEnd, mixFactor);\nreturn srgb_from_linear_L1(mixedLin);\n}\n}\nreturn getColor_L1(count);\n}\n\nvec4 computeLayer_L0(vec2 uv, vec4 prevLayerColor) {\nvec4 bg = prevLayerColor;\nfloat displacement = 0.0;\nvec2 aspectRatio = vec2(uResolution.x/uResolution.y, 1.0);\nvec2 skew = vec2(max(0.4600, 0.001), max(1.0 - 0.4600, 0.001));\nfloat halfRadius = 0.3040 * 0.5;\nfloat falloffAmount = max(1.0000, 0.001);\nfloat innerEdge = halfRadius - falloffAmount * halfRadius * 0.5;\nfloat outerEdge = halfRadius + falloffAmount * halfRadius * 0.5;\nvec2 pos = vec2(0.5, 0.5);\nvec2 scaledUV = uv * aspectRatio * rot_L0(0.0000 * TAU) * skew;\nvec2 scaledPos = pos * aspectRatio * rot_L0(0.0000 * TAU) * skew;\nfloat radius = distance(scaledUV, scaledPos);\nfloat falloff = smoothstep(innerEdge + displacement, outerEdge + displacement, radius);\nfalloff = (1.0 - falloff) * 1.0000;\nvec4 color;\nvec3 blended = blend_L0(3, vec3(0, 0, 0), bg.rgb);\ncolor = vec4(blended, 1.0) * falloff;\nreturn color;\n}\nvec4 computeLayer_L1(vec2 uv, vec4 prevLayerColor, float sharedDither) {\nvec4 color = prevLayerColor;\nif(color.a > 0.001) {\nfloat position = smoothstep(0., 1., luma_L1(color.rgb)) * (0.3900 * 2.);\nfloat posOffset = (dot(vec2(0.5383275261324042, 0.39407665505226486).x, vec2(0.5383275261324042, 0.39407665505226486).y) + 0.2300 + 0.0001) * 2.;\nposition -= (uL1_Time*0.01 + posOffset);\nfloat cycle = floor(position);\nbool reverse = 0.0000 > 0.5 && int(cycle) % 2 == 0;\nfloat animatedPos = reverse ? fract(-position) : fract(position);\nanimatedPos = reverse ? fract(-position) : fract(position);\nanimatedPos = clamp(animatedPos, 0.0, 1.0);\nvec3 gradientColor = getGradientColor_L1(animatedPos);\nfloat dither = sharedDither;\ngradientColor += dither;\nvec3 mixedColor = mix(color.rgb, gradientColor, 1.0000);\ncolor.rgb = mixedColor;\n}\nreturn color;\n;\n}\n\nvoid main() {\nvec2 uv = vTextureCoord;\nfloat sharedDither = deband_L1();\nvec4 result = texture(uBgTexture, uv);\nvec4 c0 = computeLayer_L0(uv, clamp(result + texture(uBgTexture, uv) * (1.0 - clamp(result.a, 0.0, 1.0)), 0.0, 1.0));\nc0 *= uL0_ElemOpacity;\nresult = c0 + result * (1.0 - c0.a);\nvec4 c1 = computeLayer_L1(uv, result, sharedDither);\nc1 *= uL1_ElemOpacity;\nresult = c1 + result * (1.0 - c1.a);\nfragColor = result;\n}"],"compiledVertexShaders":["#version 300 es\nprecision highp float;\nin vec3 aVertexPosition;\nin vec2 aTextureCoord;\nuniform mat4 uMVMatrix;\nuniform mat4 uPMatrix;\nout vec2 vTextureCoord;\nout vec3 vVertexPosition;\nvoid main() {\ngl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);\nvVertexPosition = aVertexPosition;\nvTextureCoord = aTextureCoord;\n}"],"sublayers":[{"id":"circle","layerType":"effect","type":"circle","sublayerIndex":0,"opacity":1,"animating":false},{"id":"gradient_map","layerType":"effect","type":"gradientMap","sublayerIndex":1,"opacity":1,"animating":false}],"data":{"uniforms":{"resolution":{"name":"uResolution","type":"2f","value":{"type":"Vec2","_x":1080,"_y":1080}},"mousePos":{"name":"uMousePos","type":"2f","value":{"type":"Vec2","_x":0.5,"_y":0.5}},"L0_elemOpacity":{"name":"uL0_ElemOpacity","type":"1f","value":1},"L1_time":{"name":"uL1_Time","type":"1f","value":0},"L1_elemOpacity":{"name":"uL1_ElemOpacity","type":"1f","value":1}},"textures":[],"timeUniforms":[],"mouseUniforms":[],"hasMouseTracking":false,"hasVideoSublayers":false,"estimatedSublayerWorkRaw":43.624507866387546,"occlusion":{"candidateLayers":1}},"states":{"appear":[],"scroll":[],"hover":[],"mousemove":[]},"breakpoints":[],"userDownsample":1,"visible":true},{"breakpoints":[],"visible":true,"aspectRatio":1,"userDownsample":1,"layerType":"effect","type":"glyphDither","usesPingPong":false,"texture":{"src":"/assets/unicorn/classic4.png","sampler":"uSprite"},"animating":false,"mouseMomentum":0,"mouseSpring":0,"isMask":0,"compiledFragmentShaders":["#version 300 es\nprecision highp float;in vec3 vVertexPosition;\nin vec2 vTextureCoord;\nuniform sampler2D uTexture;\nuniform sampler2D uSprite;uniform vec2 uMousePos;\nuniform vec2 uResolution;vec4 applyLayerMix(vec4 color, vec4 bg, float amount) {\ncolor.rgb = mix(bg.rgb, color.rgb, amount);\ncolor.a = max(bg.a, amount);\nreturn color;\n}vec3 blend (int blendMode, vec3 src, vec3 dst) {\nreturn 1. - (1. - src) * (1. - dst);\n}out vec4 fragColor;const vec3 LUMA = vec3(0.2126, 0.7152, 0.0722);float getLuminance(vec3 color) {\nreturn dot(color, LUMA);\n}float getGridSize() {\nreturn mix(0.05, 0.005, 0.8200);\n}vec2 getCellSize(float gridSize, float aspectRatio, float aspectCorrection) {\nfloat baseGrid = 1.0 / gridSize;\nreturn vec2(1.0 / (baseGrid * aspectRatio), 1.0 / baseGrid) * aspectCorrection;\n}vec2 getPixelatedCoord(vec2 uv, vec2 pos, vec2 cellSize) {\nvec2 offsetUv = uv - pos;\nvec2 cell = floor(offsetUv / cellSize);\nvec2 cellCenter = (cell + 0.5) * cellSize;\nreturn cellCenter + pos;\n}ivec2 getGlyphTextureSize() {\nivec2 glyphTextureSize = textureSize(uSprite, 0);return glyphTextureSize;\n}float getGlyphHeight(ivec2 glyphTextureSize) {\nreturn float(glyphTextureSize.y);\n}float getGlyphCount(ivec2 glyphTextureSize) {\nfloat glyphHeight = getGlyphHeight(glyphTextureSize);\nreturn max(1.0, float(glyphTextureSize.x) / glyphHeight);\n}float getGlyphSelection(float luminance, float glyphCount) {\nreturn clamp(floor(luminance * glyphCount), 0.0, glyphCount - 1.0);\n}float getPhasedGlyphSelection(float luminance, float glyphCount, float gamma) {\nfloat glyphSelection = clamp(floor(luminance * glyphCount * gamma), 0.0, glyphCount - 1.0);\nfloat phaseOffset = floor(0.0000 * glyphCount + 0.5);\nreturn mod(glyphSelection + phaseOffset, glyphCount);\n}vec2 getGlyphSheetUv(vec2 uv, vec2 pos, float aspectRatio, float aspectCorrection, float gridSize, float glyphHeight, float glyphSelection, float glyphCount) {\nfloat normalizedSpriteSizeX = 1.0 / glyphCount;\nfloat normalizedSpriteSizeY = 1.0;\nvec2 spriteSize = vec2(glyphHeight / aspectRatio, glyphHeight) * (gridSize / glyphHeight) * aspectCorrection;\nvec2 localOffset = mod(uv - pos, spriteSize) / spriteSize;\nfloat inset = 0.5 / glyphHeight;\nlocalOffset = clamp(localOffset, inset, 1.0 - inset);return vec2(\nglyphSelection * normalizedSpriteSizeX + localOffset.x * normalizedSpriteSizeX,\nlocalOffset.y * normalizedSpriteSizeY\n);\n}vec4 sampleGlyphColor(vec2 glyphUv) {\nvec4 glyphColor = vec4(0.0);glyphColor = texture(uSprite, glyphUv);return glyphColor;\n}void main() {\nvec2 uv = vTextureCoord;\nvec2 pos = vec2(0.5, 0.5) + mix(vec2(0), (uMousePos-0.5), 0.0000);\nfloat aspectRatio = uResolution.x / uResolution.y;\nfloat aspectCorrection = mix(aspectRatio, 1./aspectRatio, 0.5);\nfloat gridSize = getGridSize();\nvec2 cellSize = getCellSize(gridSize, aspectRatio, aspectCorrection);\nvec2 pixelatedCoord = getPixelatedCoord(uv, pos, cellSize);\nvec4 bg = texture(uTexture, vTextureCoord);\nvec4 color = texture(uTexture, pixelatedCoord);float luminance = getLuminance(color.rgb);\nluminance = mix(luminance, 1.0 - luminance, float(0));\nfloat gamma = pow(mix(0.2, 2.2, 0.4000), 2.2);\nivec2 glyphTextureSize = getGlyphTextureSize();\nfloat glyphHeight = getGlyphHeight(glyphTextureSize);\nfloat glyphCount = getGlyphCount(glyphTextureSize);\nfloat glyphSelection = getGlyphSelection(luminance, glyphCount);\nfloat phasedGlyphSelection = getPhasedGlyphSelection(luminance, glyphCount, gamma);\nvec2 spriteSheetUV = getGlyphSheetUv(uv, pos, aspectRatio, aspectCorrection, gridSize, glyphHeight, phasedGlyphSelection, glyphCount);\nvec4 spriteColor = sampleGlyphColor(spriteSheetUV);\nfloat alpha = smoothstep(0.0, 1.0, spriteColor.r);vec3 cc = (color.rgb - glyphSelection * 0.04) * 1.4;\nvec3 col = cc;vec3 result = mix(mix(vec3(0.0), vec3(1.0), float(0)), col, alpha);\ncolor.rgb = result;\nvec3 blended = blend(4, result, bg.rgb);\ncolor = applyLayerMix(vec4(blended, color.a), bg, 1.0000);\nfragColor = color;}"],"compiledVertexShaders":["#version 300 es\nprecision mediump float;in vec3 aVertexPosition;\nin vec2 aTextureCoord;uniform mat4 uMVMatrix;\nuniform mat4 uPMatrix;\nuniform mat4 uTextureMatrix;out vec2 vTextureCoord;\nout vec3 vVertexPosition;void main() {\ngl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);\nvTextureCoord = (uTextureMatrix * vec4(aTextureCoord, 0.0, 1.0)).xy;\n}"],"trackMouse":0,"trackAxes":"xy","data":{"depth":false,"uniforms":{},"isBackground":false,"texture":{"name":"Preset glyphs","src":"/assets/unicorn/classic4.png","sampler":"uSprite"}},"id":"glyph_dither"}],"options":{"name":"UnicornStudio Hero (Remix)","fps":60,"dpi":1.5,"scale":1,"includeLogo":false,"isProduction":false,"flatten":true},"version":"2.1.9","id":"lObcibWom1mh804go0Jd"}

