{"history":[{"layerType":"flattened","id":"flat_0","compiledFragmentShaders":["#version 300 es\n// Copyright (c) Unicorn Studio. Licensed under the Unicorn Studio Commercial License.\n// Unauthorized copying, redistribution, or use in competing products is prohibited.\nprecision highp float;\nin vec2 vTextureCoord;\nin vec3 vVertexPosition;\n\nuniform float uL0_Time;\nuniform vec2 uMousePos;\nuniform float uL0_ElemOpacity;\nuniform vec2 uResolution;\nuniform vec2 uL1_MousePos;\nuniform float uL1_Time;\nuniform float uL1_NightProgress;\nuniform float uL1_ElemOpacity;\n\nconst float PI = 3.14159265359;\n\nout vec4 fragColor;\n\nuvec2 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}\nfloat randFibo_L0(vec2 p) {\nuvec2 v = floatBitsToUint(p);\nv = pcg2d(v);\nuint r = v.x ^ v.y;\nreturn float(r) / float(0xffffffffu);\n}\nfloat deband_L0() {\nreturn (randFibo_L0(gl_FragCoord.xy) - 0.5) / 255.0;\n}\nvec3 getColor_L0(int index) {\nswitch(index) {\ncase 0: return vec3(0.2196078431372549, 0.5803921568627451, 0.8784313725490196);\ncase 1: return vec3(0.6784313725490196, 0.8784313725490196, 0.9803921568627451);\ndefault: return vec3(0.0);\n}\n}\nfloat getStop_L0(int index) {\nswitch(index) {\ncase 0: return 0.0000;\ncase 1: return 1.0000;\ndefault: return 0.0;\n}\n}\nvec2 rotate_L0(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}\nvec3 linear_from_srgb_L0(vec3 rgb) {\nreturn pow(max(rgb, vec3(0.0)), vec3(2.2));\n}\nvec3 srgb_from_linear_L0(vec3 lin) {\nreturn pow(max(lin, vec3(0.0)), vec3(1.0/2.2));\n}\nvec3 safeCbrt_L0(vec3 v) {\nreturn sign(v) * pow(abs(v), vec3(1.0/3.0));\n}\nvec3 oklab_mix_L0(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_L0( kCONEtoLMS*lin1 );\nvec3 lms2 = safeCbrt_L0( kCONEtoLMS*lin2 );\nvec3 lms = mix( lms1, lms2, a );\nlms *= 1.0 + 0.025 * a * (1.0-a);\nreturn kLMStoCONE * (lms * lms * lms);\n}\nvec3 getGradientColor_L0(float position) {\nposition = clamp(position, 0.0, 1.0);\nif (2 <= 1) return getColor_L0(0);\nint count = 2 - 1;\nfor (int i = 0;\ni < 15;\ni++) {\nif (i >= count) break;\nfloat stopA = getStop_L0(i);\nfloat stopB = getStop_L0(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_L0(getColor_L0(i));\nvec3 linB = linear_from_srgb_L0(getColor_L0(i + 1));\nvec3 mixed = oklab_mix_L0(linA, linB, t);\nreturn srgb_from_linear_L0(mixed);\n}\n}\nreturn getColor_L0(min(count, 15));\n}\nvec3 applyColorToPosition_L0(float position) {\nvec3 color = vec3(0);\nposition -= (uL0_Time * 0.01 + 0.0000);\nfloat cycle = floor(position);\nbool reverse = 1.0000 > 0.5 && int(cycle) % 2 == 0;\nfloat animatedPos = reverse ? 1.0 - fract(position) : fract(position);\ncolor = getGradientColor_L0(animatedPos);\nfloat dither = deband_L0();\ncolor += dither;\nreturn color;\n}\nvec3 linearGrad_L0(vec2 uv) {\nfloat position = (uv.x+0.5);\nreturn applyColorToPosition_L0(position);\n}\nvec3 getGradient_L0(vec2 uv) {\nreturn linearGrad_L0(uv);\n}\nvec3 getBgColor_L0(vec2 uv) {\nreturn getGradient_L0(uv);\nreturn vec3(0.2196078431372549, 0.5803921568627451, 0.8784313725490196);\n}\nvec3 blend_L1 (int blendMode, vec3 src, vec3 dst) {\nif(blendMode == 0) {\nreturn src;\n}\nif(blendMode == 1) {\nreturn src + dst;\n}\nif(blendMode == 2) {\nreturn src - dst;\n}\nif(blendMode == 3) {\nreturn src * dst;\n}\nif(blendMode == 4) {\nreturn 1. - (1. - src) * (1. - dst);\n}\nif(blendMode == 5) {\nreturn vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)), (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)), (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z)));\n}\nif(blendMode == 6) {\nreturn min(src, dst);\n}\nif(blendMode == 7) {\nreturn max(src, dst);\n}\nif(blendMode == 8) {\nreturn vec3((src.x == 1.0) ? 1.0 : min(1.0, dst.x / (1.0 - src.x)), (src.y == 1.0) ? 1.0 : min(1.0, dst.y / (1.0 - src.y)), (src.z == 1.0) ? 1.0 : min(1.0, dst.z / (1.0 - src.z)));\n}\nif(blendMode == 9) {\nreturn vec3((src.x == 0.0) ? 0.0 : (1.0 - ((1.0 - dst.x) / src.x)), (src.y == 0.0) ? 0.0 : (1.0 - ((1.0 - dst.y) / src.y)), (src.z == 0.0) ? 0.0 : (1.0 - ((1.0 - dst.z) / src.z)));\n}\nif(blendMode == 10) {\nreturn (src + dst) - 1.0;\n}\nif(blendMode == 11) {\nreturn vec3((src.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - src.x) * (1.0 - dst.x)), (src.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - src.y) * (1.0 - dst.y)), (src.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - src.z) * (1.0 - dst.z)));\n}\nif(blendMode == 12) {\nreturn vec3((src.x <= 0.5) ? (dst.x - (1.0 - 2.0 * src.x) * dst.x * (1.0 - dst.x)) : (((src.x > 0.5) && (dst.x <= 0.25)) ? (dst.x + (2.0 * src.x - 1.0) * (4.0 * dst.x * (4.0 * dst.x + 1.0) * (dst.x - 1.0) + 7.0 * dst.x)) : (dst.x + (2.0 * src.x - 1.0) * (sqrt(dst.x) - dst.x))), (src.y <= 0.5) ? (dst.y - (1.0 - 2.0 * src.y) * dst.y * (1.0 - dst.y)) : (((src.y > 0.5) && (dst.y <= 0.25)) ? (dst.y + (2.0 * src.y - 1.0) * (4.0 * dst.y * (4.0 * dst.y + 1.0) * (dst.y - 1.0) + 7.0 * dst.y)) : (dst.y + (2.0 * src.y - 1.0) * (sqrt(dst.y) - dst.y))), (src.z <= 0.5) ? (dst.z - (1.0 - 2.0 * src.z) * dst.z * (1.0 - dst.z)) : (((src.z > 0.5) && (dst.z <= 0.25)) ? (dst.z + (2.0 * src.z - 1.0) * (4.0 * dst.z * (4.0 * dst.z + 1.0) * (dst.z - 1.0) + 7.0 * dst.z)) : (dst.z + (2.0 * src.z - 1.0) * (sqrt(dst.z) - dst.z))));\n}\nif(blendMode == 13) {\nreturn abs(dst - src);\n}\nif(blendMode == 14) {\nreturn src + dst - 2.0 * src * dst;\n}\nif(blendMode == 15) {\nreturn 2.0 * src + dst - 1.0;\n}\nif(blendMode == 16) {\nreturn vec3((src.x > 0.5) ? max(dst.x, 2.0 * (src.x - 0.5)) : min(dst.x, 2.0 * src.x), (src.x > 0.5) ? max(dst.y, 2.0 * (src.y - 0.5)) : min(dst.y, 2.0 * src.y), (src.z > 0.5) ? max(dst.z, 2.0 * (src.z - 0.5)) : min(dst.z, 2.0 * src.z));\n}\nif(blendMode == 17) {\nreturn vec3((src.x <= 0.5) ? (1.0 - (1.0 - dst.x) / (2.0 * src.x)) : (dst.x / (2.0 * (1.0 - src.x))), (src.y <= 0.5) ? (1.0 - (1.0 - dst.y) / (2.0 * src.y)) : (dst.y / (2.0 * (1.0 - src.y))), (src.z <= 0.5) ? (1.0 - (1.0 - dst.z) / (2.0 * src.z)) : (dst.z / (2.0 * (1.0 - src.z))));\n}\n}\nfloat getBayer4_L1(vec2 coord) {\nivec2 p = ivec2(mod(coord, 4.0));\nint x = p.x;\nint y = p.y;\nint v = 0;\nif (y == 0) {\nif (x == 0) v = 0;\nelse if (x == 1) v = 8;\nelse if (x == 2) v = 2;\nelse v = 10;\n}\nelse if (y == 1) {\nif (x == 0) v = 12;\nelse if (x == 1) v = 4;\nelse if (x == 2) v = 14;\nelse v = 6;\n}\nelse if (y == 2) {\nif (x == 0) v = 3;\nelse if (x == 1) v = 11;\nelse if (x == 2) v = 1;\nelse v = 9;\n}\nelse {\nif (x == 0) v = 15;\nelse if (x == 1) v = 7;\nelse if (x == 2) v = 13;\nelse v = 5;\n}\nreturn (float(v) + 0.5) / 16.0;\n}\nfloat hash21_L1(vec2 p) {\nuvec2 u = uvec2(ivec2(floor(p)) + 1000000);\nuvec2 q = pcg2d(u);\nreturn float(q.x ^ q.y) / 4294967295.0;\n}\nvoid hashCell_L1(vec2 p, out float rExist, out vec2 rPos, out vec2 rMisc) {\nuvec2 u = uvec2(ivec2(floor(p)) + 1000000);\nuvec2 q1 = pcg2d(u);\nuvec2 q2 = pcg2d(q1.yx + 12345u);\nrExist = float(q1.x) / 4294967295.0;\nrPos = vec2(q1.y, q2.x) / 4294967295.0;\nrMisc = vec2(q2.y, q1.x ^ q2.y) / 4294967295.0;\n}\n\nvec4 computeLayer_L0(vec2 uv) {\nvec2 pos = vec2(0.5, 0.5) + mix(vec2(0), (uMousePos-0.5), 0.0000);\nuv -= pos;\nuv /= max(0.5000*2., 1e-5);\nuv = rotate_L0(uv, (0.2500 - 0.5) * 2. * PI);\nvec4 color = vec4(getBgColor_L0(uv), 1.0) * 1.0000;\nreturn color;\n}\nvec4 computeLayer_L1(vec2 uv, vec4 prevLayerColor) {\nvec4 bg = prevLayerColor;\nfloat aspect = uResolution.x / uResolution.y;\nfloat virtualHeight = mix(60.0, 160.0, 1.0 - 0.0000);\nvec2 pixelGrid = vec2(round(virtualHeight * aspect), round(virtualHeight));\nvec2 pixCoord = floor(uv * pixelGrid);\nvec2 pixelUv = (pixCoord + 0.5) / pixelGrid;\nfloat bayer = getBayer4_L1(pixCoord) - 0.5;\nfloat dither = bayer * 0.7400 * 0.13;\nfloat t = clamp(uL1_NightProgress, 0.0, 1.0);\nfloat skyT = clamp(pixelUv.y + dither * 0.65, 0.0, 1.0);\nfloat smoothSkyT = smoothstep(0.0, 1.0, skyT);\nvec3 daySky = mix(vec3(0.68, 0.88, 0.98), vec3(0.22, 0.58, 0.88), smoothSkyT);\nfloat dayHaze = smoothstep(0.45, 0.0, pixelUv.y);\ndaySky = mix(daySky, mix(vec3(0.68, 0.88, 0.98), vec3(0.92, 0.96, 1.0), 0.4), dayHaze * 0.5);\nvec3 sunsetZenith = vec3(0.18, 0.19, 0.42);\nvec3 sunsetMid = vec3(0.68, 0.34, 0.46);\nvec3 sunsetHorizon = vec3(0.98, 0.52, 0.26);\nvec3 sunsetSky = mix(sunsetHorizon, sunsetMid, smoothstep(0.0, 0.48, skyT));\nsunsetSky = mix(sunsetSky, sunsetZenith, smoothstep(0.42, 1.0, skyT));\nvec3 nightSky = mix(vec3(0.117647058823529, 0.133333333333333, 0.376470588235294), vec3(0.0431372549019608, 0.0509803921568627, 0.176470588235294), smoothSkyT);\nfloat nightHaze = smoothstep(0.35, 0.0, pixelUv.y);\nvec3 nightTint = mix(vec3(0.117647058823529, 0.133333333333333, 0.376470588235294), vec3(0.18, 0.16, 0.32), 0.6);\nnightSky = mix(nightSky, nightTint, nightHaze * 0.45);\nfloat toSunset = smoothstep(0.08, 0.48, t);\nfloat toNight = smoothstep(0.48, 0.92, t);\nvec3 skyColor = mix(daySky, sunsetSky, toSunset);\nskyColor = mix(skyColor, nightSky, toNight);\nskyColor = floor(skyColor * 32.0 + 0.5) / 32.0;\nfloat mouseActive = clamp(0.1700, 0.0, 1.0);\nvec2 mouseParallax = (uL1_MousePos - 0.5) * vec2(aspect, 1.0) * mouseActive * -0.1000;\nfloat starFade = smoothstep(0.38, 0.88, t);\nfloat time = uL1_Time * 0.04;\nvec3 starColor = vec3(0.0);\nfloat starMask = 0.0;\nif (starFade > 0.01) {\nvec2 bgStarPix = floor((pixelUv - mouseParallax * 0.10) * pixelGrid);\nfloat starRand = hash21_L1(bgStarPix);\nfloat starThreshold = 1.0 - (0.0900 * 0.038);\nif (starRand > starThreshold) {\nfloat phase = hash21_L1(bgStarPix + vec2(47.0, 83.0)) * 6.28318;\nfloat twinkle = sin(time * (0.4700 * 1.5 + 0.5) + phase);\nfloat steppedTwinkle = 0.0;\nif (twinkle > 0.6) {\nsteppedTwinkle = 1.0;\n}\nelse if (twinkle > 0.0) {\nsteppedTwinkle = 0.65;\n}\nelse if (twinkle > -0.5) {\nsteppedTwinkle = 0.35;\n}\nfloat tintRand = hash21_L1(bgStarPix + vec2(113.0, 271.0));\nvec3 tint = vec3(1.0, 0.98, 0.92);\nif (tintRand > 0.7) {\ntint = vec3(0.82, 0.92, 1.0);\n}\nelse if (tintRand < 0.3) {\ntint = vec3(1.0, 0.92, 0.78);\n}\nfloat starAltitude = smoothstep(0.08, 0.35, pixelUv.y - mouseParallax.y * 0.10);\nstarMask = steppedTwinkle * starAltitude * starFade;\nstarColor = tint * starMask;\n}\nvec2 sparkStarPix = floor((pixelUv - mouseParallax * 0.22) * pixelGrid);\nvec2 cell = floor(sparkStarPix / 18.0);\nfloat rExist;\nvec2 rPos, rMisc;\nhashCell_L1(cell, rExist, rPos, rMisc);\nif (rExist < 0.0900 * 0.75) {\nvec2 centerPos = cell * 18.0 + floor(rPos * 14.0) + 2.0;\nvec2 dCenter = sparkStarPix - centerPos;\nfloat manhattan = abs(dCenter.x) + abs(dCenter.y);\nfloat sparkPhase = rMisc.x * 6.28318;\nfloat sparkTwinkle = sin(time * (0.4700 * 1.8 + 0.4) + sparkPhase);\nif (sparkTwinkle > -0.2) {\nfloat sparkBri = 0.0;\nif (manhattan == 0.0) {\nsparkBri = 1.0;\n}\nelse if (manhattan == 1.0) {\nsparkBri = sparkTwinkle > 0.3 ? 0.8 : 0.45;\n}\nelse if ((abs(dCenter.x) == 2.0 && dCenter.y == 0.0) || (abs(dCenter.y) == 2.0 && dCenter.x == 0.0)) {\nif (sparkTwinkle > 0.5) sparkBri = 0.5;\n}\nfloat alt = smoothstep(0.12, 0.4, pixelUv.y - mouseParallax.y * 0.22);\nif (sparkBri > 0.0 && alt > 0.0) {\nvec3 sparkTint = mix(vec3(1.0, 0.96, 0.85), vec3(0.85, 0.95, 1.0), rMisc.y);\nfloat fBri = sparkBri * alt * starFade;\nstarColor = max(starColor, sparkTint * fBri);\nstarMask = max(starMask, fBri);\n}\n}\n}\n}\nskyColor = mix(skyColor, max(skyColor, starColor), starMask);\nfloat sunSetProgress = smoothstep(0.0, 0.68, t);\nif (sunSetProgress < 0.99) {\nvec2 sunBase = vec2(vec2(0.2, 0.3).x, 1.0 - vec2(0.2, 0.3).y);\nvec2 sunCenter = vec2(\nsunBase.x + sin(sunSetProgress * 1.5708) * 0.03,\nmix(sunBase.y, -0.30, sunSetProgress)\n);\nvec2 sunPixelUv = pixelUv - mouseParallax * 0.42;\nvec2 sunDelta = (sunPixelUv - sunCenter) * vec2(aspect, 1.0);\nfloat sunR = mix(0.065, 0.20, 0.3000);\nfloat dSun = length(sunDelta) - sunR;\nfloat sunAlpha = 1.0 - smoothstep(0.75, 1.0, sunSetProgress);\nif (dSun > 0.0 && dSun < sunR * 1.15) {\nfloat glowDist = 1.0 - (dSun / (sunR * 1.15));\nfloat glowStepped = smoothstep(0.15, 0.95, glowDist + bayer * 0.28);\nvec3 dayGlow = vec3(1.0, 0.92, 0.62);\nvec3 sunsetGlow = vec3(1.0, 0.48, 0.20);\nvec3 sunHalo = mix(dayGlow, sunsetGlow, smoothstep(0.2, 0.85, sunSetProgress));\nskyColor = mix(skyColor, sunHalo, glowStepped * 0.35 * sunAlpha);\n}\nif (dSun <= 0.0 && sunAlpha > 0.01) {\nvec2 normDelta = sunDelta / max(0.001, sunR);\nfloat coreDist = length(normDelta);\nfloat rimT = clamp(coreDist + bayer * 0.20, 0.0, 1.0);\nvec3 sunCore = mix(vec3(1.0, 1.0, 0.92), vec3(1.0, 0.86, 0.46), smoothstep(0.25, 0.9, sunSetProgress));\nvec3 sunBody = mix(vec3(1.0, 0.90, 0.44), vec3(0.98, 0.56, 0.22), smoothstep(0.2, 0.85, sunSetProgress));\nvec3 sunEdge = mix(vec3(0.98, 0.72, 0.26), vec3(0.88, 0.34, 0.16), smoothstep(0.15, 0.85, sunSetProgress));\nvec3 sunCol = sunCore;\nif (rimT > 0.78) {\nsunCol = sunEdge;\n}\nelse if (rimT > 0.48) {\nsunCol = sunBody;\n}\nfloat pixelStep = 1.0 / virtualHeight;\nif (-dSun < pixelStep * 0.75) {\nsunCol = mix(sunEdge, vec3(0.96, 0.50, 0.18), 0.3);\n}\nskyColor = mix(skyColor, sunCol, sunAlpha);\n}\n}\nfloat moonRiseProgress = smoothstep(0.38, 1.0, t);\nif (moonRiseProgress > 0.01) {\nvec2 moonCenter = vec2(vec2(0.8, 0.7).x, mix(-0.30, vec2(0.8, 0.7).y, moonRiseProgress));\nvec2 moonPixelUv = pixelUv - mouseParallax * 0.42;\nvec2 moonDelta = (moonPixelUv - moonCenter) * vec2(aspect, 1.0);\nfloat moonR = mix(0.07, 0.22, 0.2500);\nfloat moonAlpha = smoothstep(0.0, 0.25, moonRiseProgress);\nfloat dOuter = length(moonDelta) - moonR;\nvec2 cutoutOffset = vec2(moonR * 0.42, moonR * 0.22);\nfloat rCutout = moonR * 0.92;\nfloat dCutout = length(moonDelta - cutoutOffset) - rCutout;\nif (dOuter > 0.0 && dOuter < moonR * 0.85) {\nfloat glowDist = 1.0 - (dOuter / (moonR * 0.85));\nfloat glowDither = bayer * 0.25;\nfloat glowStepped = smoothstep(0.2, 0.9, glowDist + glowDither);\nvec3 haloColor = vec3(0.24, 0.26, 0.42);\nskyColor = mix(skyColor, haloColor, glowStepped * 0.4 * moonAlpha);\n}\nif (dOuter <= 0.0 && dCutout > 0.0) {\nfloat rimT = clamp((-dOuter) / (moonR * 0.35) + bayer * 0.18, 0.0, 1.0);\nfloat hollowT = clamp(dCutout / (moonR * 0.4) + bayer * 0.18, 0.0, 1.0);\nvec3 moonHighlight = vec3(1.0, 0.98, 0.90);\nvec3 moonBase = vec3(0.96, 0.91, 0.76);\nvec3 moonShadow = vec3(0.82, 0.77, 0.65);\nvec3 moonCol = mix(moonShadow, moonBase, smoothstep(0.1, 0.6, hollowT));\nmoonCol = mix(moonCol, moonHighlight, smoothstep(0.2, 0.8, rimT));\nfloat edgeDist = min(-dOuter, dCutout);\nfloat pixelStep = 1.0 / virtualHeight;\nif (edgeDist < pixelStep * 0.75) {\nmoonCol = mix(vec3(0.12, 0.14, 0.26), moonCol, 0.25);\n}\nskyColor = mix(skyColor, moonCol, moonAlpha);\n}\n}\nvec3 finalColor = skyColor;\nif (0 > 0) {\nfinalColor = blend_L1(0, bg.rgb, skyColor);\n}\nreturn vec4(finalColor, 1.0);\n}\n\nvoid main() {\nvec2 uv = vTextureCoord;\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, 0.0, 1.0));\nc1 *= uL1_ElemOpacity;\nresult = c1 + result * (1.0 - c1.a);\nfragColor = result;\n}"],"compiledVertexShaders":["#version 300 es\n// Copyright (c) Unicorn Studio. Licensed under the Unicorn Studio Commercial License.\n// Unauthorized copying, redistribution, or use in competing products is prohibited.\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":"dae11c88-8e44-4bbf-a4b8-5775dceebe83","publicId":"gradient","layerType":"effect","type":"gradient","sublayerIndex":0,"opacity":1,"animating":false},{"id":"1f800346-5c23-4a53-8b18-205dc8369561","publicId":"custom","layerType":"effect","type":"custom","sublayerIndex":1,"opacity":1,"animating":true}],"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_nightProgress":{"name":"uL1_NightProgress","type":"1f","value":0},"L1_time":{"name":"uL1_Time","type":"1f","value":0},"L1_elemOpacity":{"name":"uL1_ElemOpacity","type":"1f","value":1},"L1_mousePos":{"name":"uL1_MousePos","type":"2f","value":{"type":"Vec2","_x":0.5,"_y":0.5}}},"textures":[],"timeUniforms":[{"key":"L1_time","speed":0.26,"animating":true}],"mouseUniforms":[{"key":"L1_mousePos","momentum":1,"spring":0.39,"trackAxes":"xy"}],"hasMouseTracking":true,"hasVideoSublayers":false,"estimatedSublayerWorkRaw":28.065625000000004,"occlusion":{"candidateLayers":0}},"states":{"appear":[],"scroll":[],"hover":[],"mousemove":[]},"breakpoints":[],"userDownsample":1,"visible":true},{"breakpoints":[],"visible":true,"aspectRatio":1,"userDownsample":1,"layerType":"effect","type":"custom","usesPingPong":true,"texture":false,"textures":[],"animating":true,"mouseMomentum":0.85,"mouseSpring":0.15,"isMask":0,"description":"Flock of pixel art birds that enter from off-canvas, orbit the cursor with natural flapping and gliding wingbeats, and fade out at night.","compiledFragmentShaders":["#version 300 es\n// Copyright (c) Unicorn Studio. Licensed under the Unicorn Studio Commercial License.\n// Unauthorized copying, redistribution, or use in competing products is prohibited.\nprecision highp float;in vec2 vTextureCoord;uniform sampler2D uTexture;\nuniform sampler2D uPingPongTexture;\nuniform vec2 uResolution;uniform float uNightProgress;vec3 blend (int blendMode, vec3 src, vec3 dst) {\nif(blendMode == 0) {\nreturn src;\n}\nif(blendMode == 1) {\nreturn src + dst;\n}\nif(blendMode == 2) {\nreturn src - dst;\n}\nif(blendMode == 3) {\nreturn src * dst;\n}\nif(blendMode == 4) {\nreturn 1. - (1. - src) * (1. - dst);\n}\nif(blendMode == 5) {\nreturn vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)), (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)), (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z)));\n}\nif(blendMode == 6) {\nreturn min(src, dst);\n}\nif(blendMode == 7) {\nreturn max(src, dst);\n}\nif(blendMode == 8) {\nreturn vec3((src.x == 1.0) ? 1.0 : min(1.0, dst.x / (1.0 - src.x)), (src.y == 1.0) ? 1.0 : min(1.0, dst.y / (1.0 - src.y)), (src.z == 1.0) ? 1.0 : min(1.0, dst.z / (1.0 - src.z)));\n}\nif(blendMode == 9) {\nreturn vec3((src.x == 0.0) ? 0.0 : (1.0 - ((1.0 - dst.x) / src.x)), (src.y == 0.0) ? 0.0 : (1.0 - ((1.0 - dst.y) / src.y)), (src.z == 0.0) ? 0.0 : (1.0 - ((1.0 - dst.z) / src.z)));\n}\nif(blendMode == 10) {\nreturn (src + dst) - 1.0;\n}\nif(blendMode == 11) {\nreturn vec3((src.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - src.x) * (1.0 - dst.x)), (src.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - src.y) * (1.0 - dst.y)), (src.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - src.z) * (1.0 - dst.z)));\n}\nif(blendMode == 12) {\nreturn vec3((src.x <= 0.5) ? (dst.x - (1.0 - 2.0 * src.x) * dst.x * (1.0 - dst.x)) : (((src.x > 0.5) && (dst.x <= 0.25)) ? (dst.x + (2.0 * src.x - 1.0) * (4.0 * dst.x * (4.0 * dst.x + 1.0) * (dst.x - 1.0) + 7.0 * dst.x)) : (dst.x + (2.0 * src.x - 1.0) * (sqrt(dst.x) - dst.x))), (src.y <= 0.5) ? (dst.y - (1.0 - 2.0 * src.y) * dst.y * (1.0 - dst.y)) : (((src.y > 0.5) && (dst.y <= 0.25)) ? (dst.y + (2.0 * src.y - 1.0) * (4.0 * dst.y * (4.0 * dst.y + 1.0) * (dst.y - 1.0) + 7.0 * dst.y)) : (dst.y + (2.0 * src.y - 1.0) * (sqrt(dst.y) - dst.y))), (src.z <= 0.5) ? (dst.z - (1.0 - 2.0 * src.z) * dst.z * (1.0 - dst.z)) : (((src.z > 0.5) && (dst.z <= 0.25)) ? (dst.z + (2.0 * src.z - 1.0) * (4.0 * dst.z * (4.0 * dst.z + 1.0) * (dst.z - 1.0) + 7.0 * dst.z)) : (dst.z + (2.0 * src.z - 1.0) * (sqrt(dst.z) - dst.z))));\n}\nif(blendMode == 13) {\nreturn abs(dst - src);\n}\nif(blendMode == 14) {\nreturn src + dst - 2.0 * src * dst;\n}\nif(blendMode == 15) {\nreturn 2.0 * src + dst - 1.0;\n}\nif(blendMode == 16) {\nreturn vec3((src.x > 0.5) ? max(dst.x, 2.0 * (src.x - 0.5)) : min(dst.x, 2.0 * src.x), (src.y > 0.5) ? max(dst.y, 2.0 * (src.y - 0.5)) : min(dst.y, 2.0 * src.y), (src.z > 0.5) ? max(dst.z, 2.0 * (src.z - 0.5)) : min(dst.z, 2.0 * src.z));\n}\nif(blendMode == 17) {\nreturn vec3((src.x <= 0.5) ? (1.0 - (1.0 - dst.x) / max(2.0 * src.x, 0.0001)) : (dst.x / max(2.0 * (1.0 - src.x), 0.0001)), (src.y <= 0.5) ? (1.0 - (1.0 - dst.y) / max(2.0 * src.y, 0.0001)) : (dst.y / max(2.0 * (1.0 - src.y), 0.0001)), (src.z <= 0.5) ? (1.0 - (1.0 - dst.z) / max(2.0 * src.z, 0.0001)) : (dst.z / max(2.0 * (1.0 - src.z), 0.0001)));\n}\n}out vec4 fragColor;void main() {\nvec2 uv = vTextureCoord;\nvec4 bg = texture(uTexture, uv);float nightFade = 1.0 - smoothstep(0.35, 0.78, clamp(uNightProgress, 0.0, 1.0));\nif (nightFade <= 0.01 || 1.0000 <= 0.01) {\nfragColor = bg;\nreturn;\n}\nfloat aspect = uResolution.x / max(1.0, uResolution.y);\nfloat virtualHeight = mix(60.0, 160.0, 1.0 - 0.0000);\nvec2 pixelGrid = vec2(round(virtualHeight * aspect), round(virtualHeight));\nvec2 pixCoord = floor(uv * pixelGrid);\nvec2 pixelUv = (pixCoord + 0.5) / pixelGrid;float cellPx = 1.0 / virtualHeight;\nfloat birdHalfSpan = mix(2.5, 5.5, 0.1300) * cellPx;float birdAlpha = 0.0;for (int i = 0; i < 24; i++) {\nvec4 s0 = texelFetch(uPingPongTexture, ivec2(i, 0), 0);\nvec2 bPos = (floor(s0.xy * pixelGrid) + 0.5) / pixelGrid;\nvec2 d = (pixelUv - bPos) * vec2(aspect, 1.0);if (abs(d.x) > birdHalfSpan * 1.35 || abs(d.y) > birdHalfSpan * 1.15) {\ncontinue;\n}vec4 s1 = texelFetch(uPingPongTexture, ivec2(i, 1), 0);\nfloat age = s1.x;\nfloat flapPhase = s1.y;\nfloat glideTimer = s1.z;\nfloat lifeAlpha = 1.0;\nfloat bank = clamp(s0.z * 1.8, -0.35, 0.35);\nfloat cb = cos(bank);\nfloat sb = sin(bank);\nvec2 local = vec2(d.x * cb - d.y * sb, d.x * sb + d.y * cb) / birdHalfSpan;\nfloat cyclePos = fract(glideTimer * 0.42);\nfloat isFlapping = 1.0 - smoothstep(0.52, 0.62, cyclePos);float p = fract(flapPhase);\nfloat rawStroke = (p < 0.42)\n? mix(-0.85, 0.95, smoothstep(0.0, 0.42, p))\n: mix(0.95, -0.85, pow((p - 0.42) / 0.58, 0.65));\nfloat glideWing = 0.16 + 0.06 * sin(glideTimer * 2.5);\nfloat wingTipY = mix(glideWing, rawStroke, isFlapping);\nfloat ax = abs(local.x);\nfloat body = (ax < 0.24 && abs(local.y) < 0.22) ? 1.0 : 0.0;\nfloat wingSpan = clamp((ax - 0.15) / 0.85, 0.0, 1.0);\nfloat innerArch = 0.25 * sin(wingSpan * 3.14159) * (0.4 + 0.6 * wingTipY);\nfloat wingCenterY = mix(0.05, wingTipY, wingSpan) + innerArch;\nfloat wingThick = mix(0.24, 0.13, wingSpan);\nfloat wing = (ax >= 0.14 && ax <= 1.0 && abs(local.y - wingCenterY) < wingThick) ? 1.0 : 0.0;float hit = max(body, wing);\nif (hit > 0.5) {\nbirdAlpha = max(birdAlpha, lifeAlpha);\n}\n}float finalAlpha = clamp(birdAlpha * nightFade * 1.0000, 0.0, 1.0);\nvec3 birdCol = vec3(0.06, 0.07, 0.12);\nif (0 > 0) {\nbirdCol = blend(0, bg.rgb, vec3(0.06, 0.07, 0.12));\n}\nfragColor = vec4(mix(bg.rgb, birdCol, finalAlpha), max(bg.a, finalAlpha));\n}","#version 300 es\n// Copyright (c) Unicorn Studio. Licensed under the Unicorn Studio Commercial License.\n// Unauthorized copying, redistribution, or use in competing products is prohibited.\nprecision highp float;in vec2 vTextureCoord;uniform sampler2D uPingPongTexture;\nuniform vec2 uResolution;\nuniform vec2 uMousePos;\nuniform float uTime;out vec4 fragColor;float hash12(vec2 p) {\nvec3 p3 = fract(vec3(p.xyx) * 0.1031);\np3 += dot(p3, p3.yzx + 33.33);\nreturn fract((p3.x + p3.y) * p3.z);\n}void main() {\nivec2 texSize = textureSize(uPingPongTexture, 0);\nivec2 cell = ivec2(gl_FragCoord.xy);\nint idx = cell.x;\nint row = cell.y;vec4 state0 = texelFetch(uPingPongTexture, ivec2(idx, 0), 0);\nvec4 state1 = texelFetch(uPingPongTexture, ivec2(idx, 1), 0);float seed = hash12(vec2(float(idx) * 13.7, 7.3));\nfloat seed2 = hash12(vec2(float(idx) * 29.1, 19.4));\nfloat seed3 = hash12(vec2(float(idx) * 41.3, 31.7));float aspect = uResolution.x / max(1.0, uResolution.y);\nfloat dt = 1.0 / 60.0;bool needsInit = (state1.w < 0.5) || (uTime < 0.03);\nvec2 pos = state0.xy;\nvec2 vel = state0.zw;\nfloat age = state1.x;\nfloat flapPhase = state1.y;\nfloat glideTimer = state1.z;if (needsInit) {\nage = float(idx) / float(max(1, texSize.x));\npos = vec2(0.65, 0) + vec2((seed - 0.5) * 0.35, (seed2 - 0.5) * 0.12);\nvec2 target = mix(vec2(0.5, 0.55), uMousePos, clamp(1.0000, 0.0, 1.0));\nfloat enterT = smoothstep(0.0, 0.35, age);\nfloat ang = age * 6.28318 + seed * 6.28318;\nvec2 orbitOffset = vec2(cos(ang) * 0.22 / aspect, sin(ang) * 0.14);\npos = mix(pos, target + orbitOffset, enterT);\nvel = vec2(-sin(ang) * 0.18, cos(ang) * 0.14 + 0.05);\nflapPhase = seed3;\nglideTimer = seed2 * 3.0;\n} else {\nfloat lifeSpeed = mix(0.045, 0.075, seed);\nage += dt * lifeSpeed;if (age >= 1.0) {\nage = 0.0;\npos = vec2(0.65, 0) + vec2((seed - 0.5) * 0.35, (seed2 - 0.5) * 0.10);\nvel = vec2((seed3 - 0.5) * 0.18, 0.28 + seed2 * 0.14);\n} else {\nvec2 target = mix(vec2(0.5, 0.55), uMousePos, clamp(1.0000, 0.0, 1.0));\nfloat followStrength = smoothstep(0.08, 0.28, age);vec2 toTarget = target - pos;\nvec2 toTargetAsp = vec2(toTarget.x * aspect, toTarget.y);\nfloat dist = length(toTargetAsp) + 0.0001;\nvec2 dir = toTargetAsp / dist;\nfloat orbitDir = (idx % 2 == 0) ? 1.0 : -1.0;\nvec2 tangent = vec2(-dir.y, dir.x) * orbitDir;\nfloat desiredRadius = mix(0.12, 0.34, seed2);\nfloat radialPull = (dist - desiredRadius) * 2.2;\nfloat tSec = uTime / 60.0;\nfloat swirlAng = sin(tSec * 1.1 + seed * 12.0) * 1.6 + cos(tSec * 0.7 + seed3 * 9.0);\nvec2 turb = vec2(cos(swirlAng), sin(swirlAng)) * 0.14;vec2 entryForce = vec2(0.0, 0.35);\nvec2 exitForce = vec2((seed - 0.5) * 0.25, 0.55);\nfloat exitStrength = smoothstep(0.84, 0.96, age);\nvec2 orbitForce = dir * radialPull + tangent * (0.28 + seed3 * 0.16) + turb;\nvec2 accel = mix(entryForce, orbitForce, followStrength);\naccel = mix(accel, exitForce, exitStrength);\naccel.x /= aspect;vel += accel * dt;\nvel *= 0.975;\nfloat maxSpd = mix(0.22, 0.36, seed3);\nfloat spd = length(vec2(vel.x * aspect, vel.y));\nif (spd > maxSpd) {\nvel *= maxSpd / spd;\n}pos += vel * dt;\n}\nglideTimer += dt * mix(0.65, 1.05, seed2);\nfloat cyclePos = fract(glideTimer * 0.42);\nfloat isFlapping = 1.0 - smoothstep(0.52, 0.62, cyclePos);\nfloat beatsPerSec = mix(5.5, 10.5, 0.2900) * mix(0.88, 1.14, seed);\nflapPhase += dt * beatsPerSec * (0.12 + 0.88 * isFlapping);\n}if (row == 0) {\nfragColor = vec4(pos, vel);\n} else {\nfragColor = vec4(age, flapPhase, glideTimer, 1.0);\n}\n}"],"compiledVertexShaders":["#version 300 es\n// Copyright (c) Unicorn Studio. Licensed under the Unicorn Studio Commercial License.\n// Unauthorized copying, redistribution, or use in competing products is prohibited.\nprecision highp float;in vec3 aVertexPosition;\nin vec2 aTextureCoord;out vec2 vTextureCoord;\nout vec3 vVertexPosition;void main() {\ngl_Position = vec4(aVertexPosition, 1.0);\nvTextureCoord = (vec4(aTextureCoord, 0.0, 1.0)).xy;\n}"],"customPasses":[{"id":"custom-pass-2","label":"Pixel Art Birds","downSample":1,"includeBg":false,"needsPreviousFrame":null,"pingPong":false,"targetSize":null,"widthSegments":null,"heightSegments":null,"independentGeometry":null,"blend":false,"depthTest":null,"cullFace":null,"texturesOptions":null},{"id":"custom-pass-1","label":"Flock Physics","downSample":1,"includeBg":false,"needsPreviousFrame":null,"pingPong":true,"targetSize":{"height":2,"width":24},"widthSegments":null,"heightSegments":null,"independentGeometry":null,"blend":false,"depthTest":null,"cullFace":null,"texturesOptions":{"floatingPoint":"float","premultipliedAlpha":false,"premultiplyAlpha":false}}],"trackMouse":1,"speed":1,"trackAxes":"xy","data":{"downSample":1,"depth":false,"uniforms":{"nightProgress":{"name":"uNightProgress","type":"1f","value":0}},"isBackground":false,"pingPongTargetSize":{"height":2,"width":24},"pingPongTexturesOptions":{"floatingPoint":"float","premultiplyAlpha":false,"premultipliedAlpha":false},"passes":[{"id":"custom-pass-1","label":"Flock Physics","prop":"pass","value":1,"downSample":1,"includeBg":false,"needsPreviousFrame":null,"pingPong":true,"targetSize":{"height":2,"width":24},"widthSegments":null,"heightSegments":null,"independentGeometry":null,"blend":false,"texturesOptions":{"floatingPoint":"float","premultipliedAlpha":false,"premultiplyAlpha":false}}],"blend":false},"id":"0aad6ac5-d9b5-4f2a-8d35-7df967e4002f","publicId":"custom1"},{"layerType":"flattened","id":"flat_3","compiledFragmentShaders":["#version 300 es\n// Copyright (c) Unicorn Studio. Licensed under the Unicorn Studio Commercial License.\n// Unauthorized copying, redistribution, or use in competing products is prohibited.\nprecision highp float;\nin vec2 vTextureCoord;\nin vec3 vVertexPosition;\n\nuniform sampler2D uBgTexture;\nuniform vec2 uArtboardResolution;\nuniform vec2 uMousePos;\nuniform vec2 uResolution;\nuniform vec2 uL101_MousePos;\nuniform float uL101_Time;\nuniform float uL101_NightProgress;\nuniform float uL101_ElemOpacity;\nuniform float uL0_ElemOpacity;\n\nconst float TAU = 6.28318530718;\nconst float PI = 3.14159265359;\n\nout vec4 fragColor;\n\nvec2 rotate2D_L100(vec2 p, float angle) {\nfloat s = sin(angle);\nfloat c = cos(angle);\nreturn vec2(p.x * c - p.y * s, p.x * s + p.y * c);\n}\nvec2 getAnchorOffsets_L100() {\nreturn vec2(0.0, 0.0);\n}\nvec3 getFillColor_L100(vec2 localPos, vec2 elementSize, float signedDist, float maxInset) {\nvec2 halfSize = elementSize * 0.5;\nvec2 p = localPos - halfSize;\nreturn vec3(0, 0, 0);\n}\nfloat sdBox_L100(vec2 p, vec2 b) {\nvec2 d = abs(p) - b;\nreturn length(max(d, 0.0)) + min(max(d.x, d.y), 0.0);\n}\nfloat sdShape_L100(vec2 canvasPosPx, vec2 elementPosPx, vec2 elementSizePx, float rotationTurns) {\nvec2 p = vec2(0.0);\nvec2 halfSize = vec2(0.0);\nhalfSize = uArtboardResolution * 0.5;\np = canvasPosPx - halfSize;\nreturn sdBox_L100(p, halfSize);\nelementSizePx = abs(elementSizePx);\nvec2 centerPx = elementPosPx + elementSizePx * 0.5;\nvec2 rel = canvasPosPx - centerPx;\nvec2 local = rotate2D_L100(rel, -rotationTurns * TAU) + elementSizePx * 0.5;\np = local - elementSizePx * 0.5;\nhalfSize = elementSizePx * 0.5;\nreturn sdBox_L100(p, halfSize);\n}\nvec4 sampleShape_L100(vec2 canvasUV) {\nvec2 canvasPosPx = vec2(canvasUV.x * uArtboardResolution.x, (1.0 - canvasUV.y) * uArtboardResolution.y);\nfloat absWidth = 200.0000;\nfloat absHeight = 200.0000;\nvec2 elementSizePx = vec2(absWidth, absHeight);\nvec2 elementPosPx = vec2(0.1323, 0.3907) * uArtboardResolution - getAnchorOffsets_L100() * elementSizePx;\nfloat dist = sdShape_L100(canvasPosPx, elementPosPx, elementSizePx, 0.0000);\nfloat aa = max(length(vec2(dFdx(dist), dFdy(dist))), 0.75);\nfloat uvGrad = max(length(dFdx(canvasUV)), length(dFdy(canvasUV)));\nfloat seamFactor = smoothstep(0.01, 0.03, uvGrad);\naa = mix(aa, 0.75, seamFactor);\nfloat fillAlpha = 1.0 - smoothstep(mix(0.0, -150., 0.0000), mix(aa, 150., 0.0000), dist);\nfillAlpha = mix(fillAlpha, step(dist, 0.0), seamFactor);\nvec2 localPos;\nlocalPos = canvasPosPx;\nvec2 localSize;\nlocalSize = uArtboardResolution;\nvec2 centerPx;\ncenterPx = uArtboardResolution * 0.5;\nfloat centerDist = sdShape_L100(centerPx, elementPosPx, elementSizePx, 0.0000);\nfloat maxInset = max(-centerDist, 0.00001);\nvec3 fillRgb = getFillColor_L100(localPos, localSize, dist, maxInset);\nfloat finalFillAlpha = fillAlpha * 1.0000;\nvec4 fill = vec4(fillRgb * finalFillAlpha, finalFillAlpha);\nfloat strokeAlpha = 0.0;\nvec4 stroke = vec4(vec3(0, 0, 0) * strokeAlpha, strokeAlpha);\nvec4 col = stroke + fill * (1.0 - stroke.a);\nreturn col;\n}\nvec4 computeParentSrc_L0(vec2 uv) {\nvec2 pos = (uMousePos - 0.5) * 0.0000;\nuv -= pos;\nreturn sampleShape_L100(uv);\n}\nvec3 blend_L101 (int blendMode, vec3 src, vec3 dst) {\nif(blendMode == 0) {\nreturn src;\n}\nif(blendMode == 1) {\nreturn src + dst;\n}\nif(blendMode == 2) {\nreturn src - dst;\n}\nif(blendMode == 3) {\nreturn src * dst;\n}\nif(blendMode == 4) {\nreturn 1. - (1. - src) * (1. - dst);\n}\nif(blendMode == 5) {\nreturn vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)), (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)), (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z)));\n}\nif(blendMode == 6) {\nreturn min(src, dst);\n}\nif(blendMode == 7) {\nreturn max(src, dst);\n}\nif(blendMode == 8) {\nreturn vec3((src.x == 1.0) ? 1.0 : min(1.0, dst.x / (1.0 - src.x)), (src.y == 1.0) ? 1.0 : min(1.0, dst.y / (1.0 - src.y)), (src.z == 1.0) ? 1.0 : min(1.0, dst.z / (1.0 - src.z)));\n}\nif(blendMode == 9) {\nreturn vec3((src.x == 0.0) ? 0.0 : (1.0 - ((1.0 - dst.x) / src.x)), (src.y == 0.0) ? 0.0 : (1.0 - ((1.0 - dst.y) / src.y)), (src.z == 0.0) ? 0.0 : (1.0 - ((1.0 - dst.z) / src.z)));\n}\nif(blendMode == 10) {\nreturn (src + dst) - 1.0;\n}\nif(blendMode == 11) {\nreturn vec3((src.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - src.x) * (1.0 - dst.x)), (src.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - src.y) * (1.0 - dst.y)), (src.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - src.z) * (1.0 - dst.z)));\n}\nif(blendMode == 12) {\nreturn vec3((src.x <= 0.5) ? (dst.x - (1.0 - 2.0 * src.x) * dst.x * (1.0 - dst.x)) : (((src.x > 0.5) && (dst.x <= 0.25)) ? (dst.x + (2.0 * src.x - 1.0) * (4.0 * dst.x * (4.0 * dst.x + 1.0) * (dst.x - 1.0) + 7.0 * dst.x)) : (dst.x + (2.0 * src.x - 1.0) * (sqrt(dst.x) - dst.x))), (src.y <= 0.5) ? (dst.y - (1.0 - 2.0 * src.y) * dst.y * (1.0 - dst.y)) : (((src.y > 0.5) && (dst.y <= 0.25)) ? (dst.y + (2.0 * src.y - 1.0) * (4.0 * dst.y * (4.0 * dst.y + 1.0) * (dst.y - 1.0) + 7.0 * dst.y)) : (dst.y + (2.0 * src.y - 1.0) * (sqrt(dst.y) - dst.y))), (src.z <= 0.5) ? (dst.z - (1.0 - 2.0 * src.z) * dst.z * (1.0 - dst.z)) : (((src.z > 0.5) && (dst.z <= 0.25)) ? (dst.z + (2.0 * src.z - 1.0) * (4.0 * dst.z * (4.0 * dst.z + 1.0) * (dst.z - 1.0) + 7.0 * dst.z)) : (dst.z + (2.0 * src.z - 1.0) * (sqrt(dst.z) - dst.z))));\n}\nif(blendMode == 13) {\nreturn abs(dst - src);\n}\nif(blendMode == 14) {\nreturn src + dst - 2.0 * src * dst;\n}\nif(blendMode == 15) {\nreturn 2.0 * src + dst - 1.0;\n}\nif(blendMode == 16) {\nreturn vec3((src.x > 0.5) ? max(dst.x, 2.0 * (src.x - 0.5)) : min(dst.x, 2.0 * src.x), (src.x > 0.5) ? max(dst.y, 2.0 * (src.y - 0.5)) : min(dst.y, 2.0 * src.y), (src.z > 0.5) ? max(dst.z, 2.0 * (src.z - 0.5)) : min(dst.z, 2.0 * src.z));\n}\nif(blendMode == 17) {\nreturn vec3((src.x <= 0.5) ? (1.0 - (1.0 - dst.x) / (2.0 * src.x)) : (dst.x / (2.0 * (1.0 - src.x))), (src.y <= 0.5) ? (1.0 - (1.0 - dst.y) / (2.0 * src.y)) : (dst.y / (2.0 * (1.0 - src.y))), (src.z <= 0.5) ? (1.0 - (1.0 - dst.z) / (2.0 * src.z)) : (dst.z / (2.0 * (1.0 - src.z))));\n}\n}\nfloat getBayer4_L101(vec2 coord) {\nivec2 p = ivec2(mod(coord, 4.0));\nint x = p.x;\nint y = p.y;\nint v = 0;\nif (y == 0) {\nif (x == 0) v = 0;\nelse if (x == 1) v = 8;\nelse if (x == 2) v = 2;\nelse v = 10;\n}\nelse if (y == 1) {\nif (x == 0) v = 12;\nelse if (x == 1) v = 4;\nelse if (x == 2) v = 14;\nelse v = 6;\n}\nelse if (y == 2) {\nif (x == 0) v = 3;\nelse if (x == 1) v = 11;\nelse if (x == 2) v = 1;\nelse v = 9;\n}\nelse {\nif (x == 0) v = 15;\nelse if (x == 1) v = 7;\nelse if (x == 2) v = 13;\nelse v = 5;\n}\nreturn (float(v) + 0.5) / 16.0;\n}\nfloat hash21_L101(vec2 p) {\np = fract(p * vec2(123.34, 456.21));\np += dot(p, p + 45.32);\nreturn fract(p.x * p.y);\n}\nvec2 hash22_L101(vec2 p) {\nvec3 p3 = fract(vec3(p.xyx) * vec3(443.897, 441.423, 437.195));\np3 += dot(p3, p3.yzx + 19.19);\nreturn fract((p3.xx + p3.yz) * p3.zy);\n}\nfloat vnoise_L101(vec2 p) {\nvec2 i = floor(p);\nvec2 f = p - i;\nvec2 u = f * f * (3.0 - 2.0 * f);\nfloat a = hash21_L101(i);\nfloat b = hash21_L101(i + vec2(1.0, 0.0));\nfloat c = hash21_L101(i + vec2(0.0, 1.0));\nfloat d = hash21_L101(i + vec2(1.0, 1.0));\nreturn mix(mix(a, b, u.x), mix(c, d, u.x), u.y);\n}\nfloat fbm_L101(vec2 p) {\nfloat v = 0.0;\nfloat a = 0.5;\nmat2 rot = mat2(0.8, 0.6, -0.6, 0.8);\nfor (int i = 0;\ni < 4;\ni++) {\nv += a * vnoise_L101(p);\np = rot * p * 2.05 + vec2(1.7, 9.2);\na *= 0.5;\n}\nreturn v;\n}\nfloat smax_L101(float a, float b, float k) {\nfloat h = clamp(0.5 + 0.5 * (a - b) / k, 0.0, 1.0);\nreturn mix(b, a, h) + k * h * (1.0 - h);\n}\nvoid evalCumulus_L101(vec2 coord, float sceneY, float baseY, float layerScale, out float density, out vec2 normal, out float depth) {\nvec2 p = coord * layerScale;\nfloat stepBase = baseY + (floor(fbm_L101(vec2(p.x * 0.6, 0.0)) * 6.0) / 6.0) * 0.012;\nfloat relY = sceneY - stepBase;\nif (relY < 0.0) {\ndensity = 0.0;\nnormal = vec2(0.0, 1.0);\ndepth = 0.0;\nreturn;\n}\nfloat xPos = p.x;\nfloat cellId = floor(xPos * 0.7);\nfloat maxField = 0.0;\nvec2 weightedNorm = vec2(0.0);\nfloat normWeightSum = 0.001;\nfor (int i = -2;\ni <= 2;\ni++) {\nfloat id = cellId + float(i);\nfloat clusterFbm = fbm_L101(vec2(id * 0.35, 6.1));\nfloat cluster = smoothstep(0.38, 0.62, clusterFbm + (1.0000 - 0.5) * 0.6);\nif (cluster <= 0.03) continue;\nfor (int k = 0;\nk < 6;\nk++) {\nvec2 h = hash22_L101(vec2(id * 5.31 + float(k) * 7.89, float(k) * 13.17));\nfloat cx, cy, rBase;\nif (k == 0) {\ncx = (id + 0.42) / 0.7 + (h.x - 0.5) * 0.10;\ncy = 0.16 + 0.08 * h.y;\nrBase = 0.34;\n}\nelse if (k == 1) {\ncx = (id + 0.62) / 0.7 + (h.x - 0.5) * 0.10;\ncy = 0.22 + 0.06 * h.y;\nrBase = 0.28;\n}\nelse if (k == 2) {\ncx = (id + 0.24) / 0.7 + (h.x - 0.5) * 0.08;\ncy = 0.08 + 0.05 * h.y;\nrBase = 0.24;\n}\nelse if (k == 3) {\ncx = (id + 0.78) / 0.7 + (h.x - 0.5) * 0.08;\ncy = 0.09 + 0.05 * h.y;\nrBase = 0.22;\n}\nelse if (k == 4) {\ncx = (id + 0.10) / 0.7 + (h.x - 0.5) * 0.06;\ncy = 0.02 + 0.03 * h.y;\nrBase = 0.16;\n}\nelse {\ncx = (id + 0.90) / 0.7 + (h.x - 0.5) * 0.06;\ncy = 0.02 + 0.03 * h.y;\nrBase = 0.15;\n}\nfloat radius = rBase * (0.8 + 0.45 * h.y) * cluster;\nif (radius <= 0.02) continue;\nvec2 dVec = vec2(p.x - cx, (relY - cy) * 1.15);\nfloat dist = length(dVec);\nfloat puff = clamp(1.0 - dist / radius, 0.0, 1.0);\npuff = puff * puff * (3.0 - 2.0 * puff);\nmaxField = smax_L101(maxField, puff, 0.05);\nfloat w = puff * puff;\nweightedNorm += (dVec / radius) * w;\nnormWeightSum += w;\n}\n}\nfloat microPuffs = vnoise_L101(p * 6.5 + vec2(2.1, 5.3)) * 0.12;\nfloat totalField = maxField + microPuffs * smoothstep(0.04, 0.25, maxField);\nfloat baseCut = smoothstep(0.0, 0.02, relY);\ndensity = clamp(smoothstep(0.18, 0.45, totalField) * baseCut, 0.0, 1.0);\nnormal = normalize(weightedNorm / normWeightSum + vec2(0.0001));\ndepth = maxField;\n}\nvec4 computeLayer_L101(vec2 uv, vec4 prevLayerColor) {\nvec4 bg = prevLayerColor;\nfloat aspect = uResolution.x / uResolution.y;\nfloat virtualHeight = mix(60.0, 160.0, 1.0 - 0.1400);\nvec2 pixelGrid = vec2(round(virtualHeight * aspect), round(virtualHeight));\nvec2 pixCoord = floor(uv * pixelGrid);\nvec2 pixelUv = (pixCoord + 0.5) / pixelGrid;\nfloat bayer = getBayer4_L101(pixCoord) - 0.5;\nfloat dither = bayer * 1.0000 * 0.12;\nfloat time = uL101_Time * 0.0035 * 0.2600;\nfloat mouseActive = clamp(0.2000, 0.0, 1.0);\nvec2 mouseParallax = (uL101_MousePos - 0.5) * vec2(aspect, 1.0) * mouseActive * -0.1500;\nvec2 aspUv = (pixelUv - vec2(0.3, 0.21999999999999997)) * vec2(aspect, 1.0) / max(0.1, 0.4300 * 2.0);\nfloat sceneY = pixelUv.y - (vec2(0.3, 0.21999999999999997).y - 0.5);\nvec2 bgCloudCoord = aspUv - mouseParallax * 0.12;\nbgCloudCoord.x -= time * 0.35;\nfloat bgSceneY = sceneY - mouseParallax.y * 0.07;\nfloat bgDensity, bgDepth;\nvec2 bgNormal;\nevalCumulus_L101(bgCloudCoord + vec2(14.2, 3.1), bgSceneY, 0.22, 1.35, bgDensity, bgNormal, bgDepth);\nvec2 fgCloudCoord = aspUv - mouseParallax * 0.45;\nfgCloudCoord.x -= time * 0.75;\nfloat fgSceneY = sceneY - mouseParallax.y * 0.24;\nfloat fgDensity, fgDepth;\nvec2 fgNormal;\nevalCumulus_L101(fgCloudCoord, fgSceneY, 0.32, 0.82, fgDensity, fgNormal, fgDepth);\nvec2 lightDir = normalize(vec2(-0.45, 0.75));\nfloat lightDot = dot(fgNormal, lightDir);\nfloat relY = fgSceneY - 0.32;\nfloat baseShadowFactor = 1.0 - smoothstep(0.02, 0.10, relY);\nfloat lightTerm = 0.46 + fgDepth * 0.28 + lightDot * 0.36 + smoothstep(0.04, 0.35, relY) * 0.22;\nlightTerm -= baseShadowFactor * 0.42;\nfloat nightT = clamp(uL101_NightProgress, 0.0, 1.0);\nfloat sunsetTint = smoothstep(0.10, 0.45, nightT) * (1.0 - smoothstep(0.60, 0.90, nightT));\nfloat cloudFade = 1.0 - smoothstep(0.30, 0.85, nightT);\nvec3 cHighlight = mix(vec3(0.99, 1, 1), vec3(1.0, 0.80, 0.56), sunsetTint * 0.85);\nvec3 cBody = mix(vec3(0.86, 0.93, 0.98), vec3(0.92, 0.56, 0.48), sunsetTint * 0.85);\nvec3 cShadow = mix(vec3(0.62, 0.78, 0.92), vec3(0.58, 0.36, 0.48), sunsetTint * 0.85);\nvec3 cBase = mix(vec3(0.38, 0.56, 0.76), vec3(0.30, 0.22, 0.38), sunsetTint * 0.85);\nvec3 fgColor;\nfloat steppedLight = lightTerm + dither;\nif (steppedLight > 0.62) {\nfgColor = cHighlight;\n}\nelse if (steppedLight > 0.42) {\nfgColor = cBody;\n}\nelse if (steppedLight > 0.24) {\nfgColor = cShadow;\n}\nelse {\nfgColor = cBase;\n}\nfloat bgLight = bgDepth * 0.4 + dot(bgNormal, lightDir) * 0.3 + dither;\nvec3 bgCloudColor = (bgLight > 0.35) ? mix(cBody, bg.rgb, 0.25) : mix(cShadow, bg.rgb, 0.35);\nvec3 sceneColor = bg.rgb;\nif (cloudFade > 0.001) {\nif (bgDensity > 0.15) {\nsceneColor = mix(bg.rgb, bgCloudColor, cloudFade);\n}\nfloat fgThreshold = 0.25 - dither * 0.4;\nif (fgDensity > fgThreshold) {\nsceneColor = mix(bg.rgb, fgColor, cloudFade);\n}\n}\nvec3 finalColor = sceneColor;\nif (7 > 0) {\nfinalColor = blend_L101(7, bg.rgb, sceneColor);\n}\nreturn vec4(finalColor, 1.0);\n}\n\nvec4 computeLayer_L0(vec2 uv) {\nvec4 stackResult = computeParentSrc_L0(uv);\nif (stackResult.a < 0.001) return vec4(0.0);\nvec4 sc0 = computeLayer_L101(uv, stackResult);\nsc0 *= uL101_ElemOpacity;\nstackResult = sc0 + stackResult * (1.0 - sc0.a);\nreturn stackResult;\n}\n\nvoid main() {\nvec2 uv = vTextureCoord;\nvec4 result = texture(uBgTexture, uv);\nvec4 c0 = computeLayer_L0(uv);\n{\nvec3 _s = c0.rgb / max(c0.a, 0.0001);\nvec3 _d = result.rgb;\nc0 = vec4(max(_s, _d), 1.0) * (c0.a * uL0_ElemOpacity);\n}\nresult = c0 + result * (1.0 - c0.a);\nfragColor = result;\n}"],"compiledVertexShaders":["#version 300 es\n// Copyright (c) Unicorn Studio. Licensed under the Unicorn Studio Commercial License.\n// Unauthorized copying, redistribution, or use in competing products is prohibited.\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":"d8e761cb-50e9-4ade-adc8-4d912e115bb0","publicId":"shape","layerType":"shape","sublayerIndex":100,"opacity":1,"blendMode":"LIGHTEN","animating":false,"width":200,"widthMode":1,"height":200,"heightMode":1,"left":0.13229166666666667,"top":0.3906777777777778,"anchorPoint":0,"aspectRatio":1.6},{"id":"47509ae0-df7a-479d-b60f-e9e4f42ae3aa","publicId":"custom2","layerType":"effect","type":"custom","sublayerIndex":101,"opacity":1,"animating":true}],"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}},"artboardResolution":{"name":"uArtboardResolution","type":"2f","value":{"type":"Vec2","_x":1920,"_y":816}},"L100_aspectRatio":{"name":"uAspectRatio","type":"1f","value":1.6},"L101_nightProgress":{"name":"uL101_NightProgress","type":"1f","value":0},"L101_time":{"name":"uL101_Time","type":"1f","value":0},"L101_elemOpacity":{"name":"uL101_ElemOpacity","type":"1f","value":1},"L101_mousePos":{"name":"uL101_MousePos","type":"2f","value":{"type":"Vec2","_x":0.5,"_y":0.5}},"L0_elemOpacity":{"name":"uL0_ElemOpacity","type":"1f","value":1}},"textures":[],"timeUniforms":[{"key":"L101_time","speed":0.78,"animating":true}],"mouseUniforms":[{"key":"L101_mousePos","momentum":1,"spring":0,"trackAxes":"xy"}],"hasMouseTracking":true,"hasVideoSublayers":false,"estimatedSublayerWorkRaw":308.90667400360104,"occlusion":{"candidateLayers":0}},"states":{"appear":[],"scroll":[],"hover":[],"mousemove":[]},"breakpoints":[],"userDownsample":1,"visible":true},{"breakpoints":[],"visible":true,"aspectRatio":1,"userDownsample":1,"states":{"appear":[],"scroll":[],"hover":[],"mousemove":[{"local":{"pendingChanges":{},"changeDebouncer":null,"dragSession":null},"type":"mousemove","id":"2d67264b-a106-4104-a5c6-f43415cab203","prop":"scale","progress":0,"sensitivity":0.63,"momentum":0.66,"spring":0.65,"_velocity":0,"delay":0,"mode":"velocity","axisMode":"both","point":{"x":0.5,"y":0.5},"value":1,"responsiveProps":{},"lastMousePos":null,"lastMoveTime":null,"breakpoints":["Desktop"],"uniformData":{"type":"1f","name":"uScale"}}]},"layerType":"effect","type":"custom","usesPingPong":false,"texture":false,"textures":[],"animating":true,"mouseMomentum":0.92,"mouseSpring":0.3,"isMask":0,"description":"Interactive pixel art UFO that follows the mouse at night with rotational momentum and beams up a cow when triggered.","compiledFragmentShaders":["#version 300 es\n// Copyright (c) Unicorn Studio. Licensed under the Unicorn Studio Commercial License.\n// Unauthorized copying, redistribution, or use in competing products is prohibited.\nprecision highp float;in vec2 vTextureCoord;uniform sampler2D uPreviousFrameTexture;\nuniform vec2 uMousePos;out vec4 fragColor;void main() {\nvec4 state = texelFetch(uPreviousFrameTexture, ivec2(0, 0), 0);if (state.a < 0.5) {\nfragColor = vec4(uMousePos.x, 0.0, 0.0, 1.0);\nreturn;\n}float prevX = state.r;\nfloat angle = state.g;\nfloat angVel = state.b;float velX = clamp(uMousePos.x - prevX, -0.15, 0.15);\nfloat mom = clamp(0.8000, 0.0, 1.0);float gain = mix(0.5, 3.2, mom);\nfloat stiffness = mix(0.22, 0.09, mom);\nfloat damping = mix(0.68, 0.88, mom);float torque = velX * gain * clamp(1.0000, 0.0, 1.0);\nangVel = angVel * damping + (torque - angle * stiffness);\nangle = clamp(angle + angVel, -0.45, 0.45);fragColor = vec4(uMousePos.x, angle, angVel, 1.0);\n}","#version 300 es\n// Copyright (c) Unicorn Studio. Licensed under the Unicorn Studio Commercial License.\n// Unauthorized copying, redistribution, or use in competing products is prohibited.\nprecision highp float;in vec2 vTextureCoord;uniform sampler2D uTexture;\nuniform sampler2D uBgTexture;\nuniform vec2 uResolution;\nuniform vec2 uMousePos;\nuniform float uTime;uniform float uScale;\nuniform float uNightProgress;\nuniform float uAbductProgress;vec3 blend (int blendMode, vec3 src, vec3 dst) {\nreturn src;\n}out vec4 fragColor;float hash21(vec2 p) {\np = fract(p * vec2(123.34, 456.21));\np += dot(p, p + 45.32);\nreturn fract(p.x * p.y);\n}vec4 sampleUfoPixel(ivec2 cell, float time) {\nint ax = abs(cell.x);\nint y = cell.y;if (ax == 0 && y == 7) return vec4(0.95, 0.35, 0.35, 1.0);\nif (ax == 0 && y == 6) return vec4(0.65, 0.72, 0.82, 1.0);bool inDome = (y == 5 && ax <= 3) || (y == 4 && ax <= 4) || (y == 3 && ax <= 5) || (y == 2 && ax <= 5);\nbool domeOutline = (y == 5 && ax == 3) || (y == 4 && ax == 4) || (y == 3 && ax == 5) || (y == 6 && ax <= 2);\nif (y == 6 && ax >= 1 && ax <= 2) return vec4(0.12, 0.16, 0.24, 1.0);\nif (inDome) {\nif (domeOutline) return vec4(0.14, 0.20, 0.30, 1.0);\nif ((cell.x == -2 && y == 4) || (cell.x == -3 && y == 3)) return vec4(0.88, 0.98, 1.0, 1.0);\nif (ax <= 1 && y >= 2 && y <= 3) {\nif (ax == 1 && y == 3) return vec4(0.10, 0.15, 0.12, 1.0);\nreturn vec4(0.45, 0.88, 0.42, 1.0);\n}\nreturn vec4(0.38, 0.78, 0.92, 0.92);\n}if (y == 1) {\nif (ax == 9 || ax == 10) return vec4(0.12, 0.16, 0.24, 1.0);\nif (ax <= 8) {\nif (cell.x < -3) return vec4(0.82, 0.88, 0.94, 1.0);\nif (cell.x > 4) return vec4(0.50, 0.58, 0.68, 1.0);\nreturn vec4(0.68, 0.76, 0.85, 1.0);\n}\n}if (y == 0) {\nif (ax == 12 || ax == 11) return vec4(0.12, 0.16, 0.24, 1.0);\nif (ax <= 10) {\nif (ax == 0 || ax == 4 || ax == 8) {\nint lightIdx = (cell.x + 8) / 4;\nfloat chase = mod(floor(time * 4.5), 5.0);\nbool lit = abs(float(lightIdx) - chase) < 0.5 || abs(float(lightIdx) - chase + 5.0) < 0.5;\nvec3 offCol = vec3(0.28, 0.34, 0.42);\nvec3 onCol = mod(float(lightIdx), 2.0) < 0.5 ? vec3(1.0, 0.92, 0.45) : vec3(0.45, 1.0, 0.72);\nreturn vec4(lit ? onCol : offCol, 1.0);\n}\nreturn vec4(0.44, 0.52, 0.62, 1.0);\n}\n}if (y == -1) {\nif (ax == 10 || ax == 9) return vec4(0.12, 0.16, 0.24, 1.0);\nif (ax <= 8) {\nif (ax <= 2) return vec4(0.22, 0.28, 0.36, 1.0);\nreturn vec4(0.32, 0.39, 0.49, 1.0);\n}\n}\nif (y == -2) {\nif (ax <= 6 && ax >= 5) return vec4(0.12, 0.16, 0.24, 1.0);\nif (ax <= 4) return vec4(0.18, 0.24, 0.32, 1.0);\n}\nif (y == -3 && ax <= 2) {\nreturn vec4(0.35, 0.95, 0.65, 0.9);\n}return vec4(0.0);\n}vec4 sampleCowPixel(ivec2 cell) {\nint x = cell.x;\nint y = cell.y;if ((x == -4 && y == 4) || (x == -2 && y == 4)) return vec4(0.88, 0.82, 0.66, 1.0);\nif (x == -1 && y == 3) return vec4(0.18, 0.18, 0.22, 1.0);if (x >= -6 && x <= -2 && y >= 0 && y <= 3) {\nif (x == -6 && (y == 0 || y == 1)) return vec4(0.95, 0.68, 0.72, 1.0);\nif (x == -4 && y == 2) return vec4(0.12, 0.12, 0.15, 1.0);\nif (x == -3 && y == 3) return vec4(0.18, 0.18, 0.22, 1.0);\nreturn vec4(0.96, 0.96, 0.94, 1.0);\n}if (x >= -2 && x <= 4 && y >= -1 && y <= 2) {\nbool spot = (x >= 0 && x <= 2 && y >= 1 && y <= 2) || (x >= 2 && x <= 3 && y == 0);\nif (spot) return vec4(0.18, 0.18, 0.22, 1.0);\nif (x >= 1 && x <= 2 && y == -1) return vec4(0.95, 0.68, 0.72, 1.0);\nreturn vec4(0.96, 0.96, 0.94, 1.0);\n}if ((x == 5 && y == 1) || (x == 5 && y == 0)) return vec4(0.18, 0.18, 0.22, 1.0);if (y >= -4 && y <= -2) {\nif (x == -2 || x == -1 || x == 3 || x == 4) {\nif (y == -4) return vec4(0.22, 0.22, 0.26, 1.0);\nreturn vec4(0.92, 0.92, 0.90, 1.0);\n}\n}return vec4(0.0);\n}void main() {\nvec2 uv = vTextureCoord;\nvec4 bg = texture(uBgTexture, uv);float nightVis = smoothstep(0.42, 0.85, clamp(uNightProgress, 0.0, 1.0));\nfloat masterAlpha = nightVis * clamp(1.0000, 0.0, 1.0);\nif (masterAlpha <= 0.001) {\nfragColor = bg;\nreturn;\n}float time = uTime * 0.04;\nfloat pxSize = mix(2.0, 8.0, clamp(0.0000, 0.0, 1.0));vec2 gridUv = (floor(gl_FragCoord.xy / pxSize) + 0.5) * pxSize / uResolution;\nfloat aspect = uResolution.x / max(uResolution.y, 1.0);vec2 trackedCenter = vec2(0.5, 0.5) + mix(vec2(0.0), uMousePos - 0.5, clamp(1.0000, 0.0, 1.0));\nfloat hoverY = sin(time * 2.2) * 0.015;\nfloat hoverX = cos(time * 1.1) * 0.006;\nvec2 ufoCenter = trackedCenter + vec2(hoverX, hoverY);float cellScale = mix(0.0035, 0.014, clamp(uScale, 0.0, 1.0));\nvec2 delta = vec2((gridUv.x - ufoCenter.x) * aspect, gridUv.y - ufoCenter.y);float dynamicTilt = texelFetch(uTexture, ivec2(0, 0), 0).g;\nfloat tilt = sin(time * 1.4) * 0.05 + dynamicTilt;\nfloat ct = cos(tilt);\nfloat st = sin(tilt);\nvec2 ufoLocal = mat2(ct, -st, st, ct) * delta;\nivec2 ufoCell = ivec2(round(ufoLocal / cellScale));vec4 generated = vec4(0.0);float abductT = clamp(uAbductProgress, 0.0, 1.0);\nfloat beamOpen = smoothstep(0.0, 0.14, abductT) * (1.0 - smoothstep(0.84, 1.0, abductT));\nif (beamOpen > 0.001 && delta.y < -cellScale * 1.5 && delta.y > -0.46) {\nfloat depth = -delta.y;\nfloat halfWidth = mix(cellScale * 2.2, cellScale * 12.5, clamp(depth / 0.42, 0.0, 1.0)) * beamOpen;\nif (abs(delta.x) < halfWidth) {\nfloat edgeNorm = abs(delta.x) / max(halfWidth, 0.0001);\nfloat edgeFade = 1.0 - smoothstep(0.55, 1.0, edgeNorm);\nfloat vertFade = 1.0 - smoothstep(0.28, 0.45, depth);\nfloat scanBand = 0.65 + 0.35 * step(0.45, fract(depth * 18.0 + time * 1.8));\nfloat dither = hash21(floor(gl_FragCoord.xy / pxSize));\nfloat beamAlpha = edgeFade * vertFade * beamOpen * scanBand * 0.55;\nif (beamAlpha > dither * 0.35) {\ngenerated = vec4(vec3(0.35, 1, 0.65), beamAlpha);\n}\n}\n}if (abductT > 0.08 && abductT < 0.88) {\nfloat lift = smoothstep(0.14, 0.82, abductT);\nfloat cowScale = cellScale * mix(1.0, 0.25, smoothstep(0.68, 0.86, abductT));\nfloat cowFade = smoothstep(0.08, 0.18, abductT) * (1.0 - smoothstep(0.76, 0.86, abductT));\nfloat cowY = mix(-0.34, -cellScale * 2.5, lift);\nfloat cowWiggle = sin(time * 5.5) * 0.22;\nfloat cw = cos(cowWiggle);\nfloat sw = sin(cowWiggle);\nvec2 cowDelta = delta - vec2(sin(time * 3.0) * 0.008, cowY);\nvec2 cowLocal = mat2(cw, -sw, sw, cw) * cowDelta;\nivec2 cowCell = ivec2(round(cowLocal / max(cowScale, 0.0005)));\nif (abs(cowCell.x) <= 7 && abs(cowCell.y) <= 5) {\nvec4 cowPx = sampleCowPixel(cowCell);\nif (cowPx.a > 0.01) {\nfloat cAlpha = cowPx.a * cowFade;\nvec3 cCol = mix(cowPx.rgb, vec3(0.35, 1, 0.65), 0.22);\ngenerated.rgb = mix(generated.rgb, cCol, cAlpha);\ngenerated.a = max(generated.a, cAlpha);\n}\n}\n}if (abs(ufoCell.x) <= 13 && ufoCell.y >= -4 && ufoCell.y <= 7) {\nvec4 ufoPx = sampleUfoPixel(ufoCell, time);\nif (ufoPx.a > 0.01) {\ngenerated.rgb = mix(generated.rgb, ufoPx.rgb, ufoPx.a);\ngenerated.a = max(generated.a, ufoPx.a);\n}\n}float finalAlpha = generated.a * masterAlpha;\nvec3 blended = generated.rgb;\nif (0 > 0) {\nblended = blend(0, bg.rgb, generated.rgb);\n}\nfragColor = vec4(mix(bg.rgb, blended, finalAlpha), max(bg.a, finalAlpha));\n}"],"compiledVertexShaders":["#version 300 es\n// Copyright (c) Unicorn Studio. Licensed under the Unicorn Studio Commercial License.\n// Unauthorized copying, redistribution, or use in competing products is prohibited.\nprecision highp float;in vec3 aVertexPosition;\nin vec2 aTextureCoord;out vec2 vTextureCoord;\nout vec3 vVertexPosition;void main() {\ngl_Position = vec4(aVertexPosition, 1.0);\nvTextureCoord = (vec4(aTextureCoord, 0.0, 1.0)).xy;\n}"],"customPasses":[{"id":"ufo-state-pass","label":"Tilt Physics","downSample":1,"includeBg":false,"needsPreviousFrame":"pass","pingPong":false,"targetSize":{"width":4,"height":4},"widthSegments":null,"heightSegments":null,"independentGeometry":null,"blend":false,"depthTest":null,"cullFace":null,"texturesOptions":{"floatingPoint":"half-float","premultipliedAlpha":false,"premultiplyAlpha":false}},{"id":"custom-pass-1","label":"UFO & Beam","downSample":1,"includeBg":true,"needsPreviousFrame":null,"pingPong":false,"targetSize":null,"widthSegments":null,"heightSegments":null,"independentGeometry":null,"blend":false,"depthTest":null,"cullFace":null,"texturesOptions":null}],"trackMouse":1,"scale":0.22,"speed":0.5,"trackAxes":"xy","data":{"downSample":1,"depth":false,"uniforms":{"nightProgress":{"name":"uNightProgress","type":"1f","value":0},"abductProgress":{"name":"uAbductProgress","type":"1f","value":0}},"isBackground":false,"passes":[{"id":"custom-pass-1","label":"UFO & Beam","prop":"pass","value":1,"downSample":1,"includeBg":true,"needsPreviousFrame":null,"pingPong":false,"targetSize":null,"widthSegments":null,"heightSegments":null,"independentGeometry":null,"blend":false,"texturesOptions":null}],"blend":false},"id":"481bcc59-7fd6-4cd3-b4dc-079bbc520cbe","publicId":"custom3"}],"options":{"name":"Zazz - Hero Backgrounds","fps":60,"dpi":1,"scale":1,"includeLogo":false,"isProduction":true,"flatten":true},"variables":{"definitions":[{"id":"a6a81120-3b44-4fa6-82a9-5b2e22221064","name":"nightProgress","type":"number","defaultValue":0,"description":"Smoothly transitions the scene from Day (0) through Sunset (~0.45) to Night (1).","validation":{"output":"percent"}},{"id":"d2a7bdcd-ed91-41ee-8d66-dca51a200087","name":"abductProgress","type":"number","defaultValue":0,"description":"Animates the UFO tractor beam and cow abduction from 0 to 1 when triggered on click.","validation":{"output":"percent"}},{"id":"var_lmcli221","name":"particleVisibility","type":"boolean","defaultValue":true,"description":"Show or hide the birds and ufo effects.","validation":{}}],"bindings":[{"id":"bind_jfxo6gjn","layerId":"flat_3","kind":"prop","target":"L101_nightProgress","variableId":"a6a81120-3b44-4fa6-82a9-5b2e22221064","enabled":true},{"id":"bind_v93ndp8w","layerId":"481bcc59-7fd6-4cd3-b4dc-079bbc520cbe","kind":"prop","target":"nightProgress","variableId":"a6a81120-3b44-4fa6-82a9-5b2e22221064","enabled":true},{"id":"bind_5386niay","layerId":"481bcc59-7fd6-4cd3-b4dc-079bbc520cbe","kind":"prop","target":"abductProgress","variableId":"d2a7bdcd-ed91-41ee-8d66-dca51a200087","enabled":true},{"id":"bind_jf7i4ghv","layerId":"481bcc59-7fd6-4cd3-b4dc-079bbc520cbe","kind":"prop","target":"visible","variableId":"var_lmcli221","enabled":true},{"id":"bind_p7aj858a","layerId":"flat_0","kind":"prop","target":"L1_nightProgress","variableId":"a6a81120-3b44-4fa6-82a9-5b2e22221064","enabled":true},{"id":"bind_1gjcrnhr","layerId":"0aad6ac5-d9b5-4f2a-8d35-7df967e4002f","kind":"prop","target":"nightProgress","variableId":"a6a81120-3b44-4fa6-82a9-5b2e22221064","enabled":true},{"id":"bind_wp4ah590","layerId":"0aad6ac5-d9b5-4f2a-8d35-7df967e4002f","kind":"prop","target":"visible","variableId":"var_lmcli221","enabled":true}],"presets":[{"id":"preset_ee7wfw1y","name":"Day","description":"Bright daytime sky with pixel art sun and drifting cumulus clouds.","values":{"a6a81120-3b44-4fa6-82a9-5b2e22221064":0},"createdAt":"2026-11-13T17:48:06.858Z","updatedAt":"2026-11-13T17:48:06.858Z"},{"id":"preset_az9rktgs","name":"Sunset","description":"Golden hour sunset with setting sun and warm tinted clouds.","values":{"a6a81120-3b44-4fa6-82a9-5b2e22221064":0.45},"createdAt":"2026-11-13T17:48:06.874Z","updatedAt":"2026-11-13T17:48:06.874Z"},{"id":"preset_mr2c2qq7","name":"Night","description":"Clear night sky with rising crescent moon and twinkling stars.","values":{"a6a81120-3b44-4fa6-82a9-5b2e22221064":1},"createdAt":"2026-11-13T17:48:06.880Z","updatedAt":"2026-11-13T17:48:06.880Z"}]},"version":"2.6.1","id":"BWPAZHp6tUonaqWPXmft"}