Bồ công anh

của Nguyễn Ngọc Tuấn, thanh tiến trình

1/4 màn hình bay

Cần MusicBar 2.0 trở lên: skin này dùng thứ bản cũ chưa có (vẽ tràn lên trên taskbar, hình động đi kèm). Bản cũ hơn không thấy nó trong kho, cập nhật app là có.

24 lượt tải Tải file, 24.3 KB
Cách cài, mã SHA-256 và mã nguồn

Bấm Áp dụng: MusicBar tự tải về, kiểm tra mã SHA-256 rồi mặc lên taskbar; có rồi thì mặc luôn. Cần MusicBar 1.8 trở lên.

SHA-256 2c9ef7e1ab6dbd340268c2595afb30b839b87c3b72f4b78a00cf7df0023c7ce0

//! name: Tanpopo no Kaze v2 (Bồ Công Anh)
//! author: MusicBar v2 Custom
//! kind: progress
//! headroom: 200
//! bloom: 0.28 0.85
//! description: Bồ công anh bay đầy trời phía trên và thanh taskbar sống động với hạt bay tầm thấp, đom đóm phấn hoa, gió lụa chảy sáng và đồng cỏ lay theo nhạc

static const float PI  = 3.14159265;
static const float TAU = 6.28318530;

float hash11(float p)
{
    p = frac(p * 0.1031);
    p *= p + 33.33;
    p *= p + p;
    return frac(p);
}

float2 hash21(float p)
{
    float3 p3 = frac(float3(p, p, p) * float3(0.1031, 0.1030, 0.0973));
    p3 += dot(p3, p3.yzx + 33.33);
    return frac((p3.xx + p3.yz) * p3.zy);
}

float3 hash32(float2 p)
{
    float3 p3 = frac(float3(p.xyx) * float3(0.1031, 0.1030, 0.0973));
    p3 += dot(p3, p3.yxz + 33.33);
    return frac((p3.xxy + p3.yzz) * p3.zyx);
}

float sdSegment(float2 p, float2 a, float2 b)
{
    float2 pa = p - a;
    float2 ba = b - a;
    float h = saturate(dot(pa, ba) / max(dot(ba, ba), 1e-5));
    return length(pa - ba * h);
}

// Keep tint colors clean & vivid (never muddy brown/gray) over pure white app windows
float3 cleanPastel(float3 c)
{
    float mx = max(c.r, max(c.g, c.b));
    float mn = min(c.r, min(c.g, c.b));
    float sat = (mx - mn) / max(mx, 1e-4);
    float3 sakura = float3(0.95, 0.56, 0.76);
    float3 boosted = saturate(c / max(mx, 0.25));
    boosted = lerp(float3(1.0, 0.90, 0.96), boosted, 0.78);
    return lerp(sakura, boosted, smoothstep(0.12, 0.45, sat));
}

// O(1) loop-free polar SDF dandelion seed — ultra-fast 60fps & feathery!
// Returns float3(plumeFluff, fineStalk, goldenSeed)
float3 drawFastSeed(float2 p, float scale, float angle, float flutter)
{
    float ca = cos(angle);
    float sa = sin(angle);
    float2 q = float2(ca * p.x + sa * p.y, -sa * p.x + ca * p.y) / max(scale, 0.05);

    if (dot(q, q) > 210.0) return float3(0.0, 0.0, 0.0);

    // 1. Crisp honey-gold teardrop seed (achene) at bottom
    float2 sp = q - float2(0.0, -4.8);
    float golden = smoothstep(1.45, 0.38, length(sp * float2(1.9, 0.85)));

    // 2. Hair-thin stalk from seed up to pappus hub
    float stalkD = sdSegment(q, float2(0.0, -3.5), float2(0.0, 2.0));
    float stalk = smoothstep(0.52, 0.14, stalkD) * 0.88;

    // 3. O(1) Polar fan umbrella: 7 curving silky hairs + feathery cotton tips
    float2 fq = q - float2(0.0, 2.0);
    float r = length(fq);
    float a = atan2(fq.x, fq.y);
    float fanHalf = 1.06;
    float inFan = smoothstep(fanHalf + 0.16, fanHalf - 0.06, abs(a));

    float maxLen = (7.2 - 1.3 * (a * a)) + 0.18 * sin(flutter + a * 4.0);
    float inRad  = smoothstep(0.3, 1.4, r) * smoothstep(maxLen + 0.8, maxLen - 0.9, r);

    float rayFreq = 6.0 / fanHalf;
    float rayWave = abs(sin(a * rayFreq * PI * 0.5));
    float rayWidth = saturate(0.28 + 0.16 * (r / max(maxLen, 1.0)));
    float hairs = smoothstep(rayWidth, rayWidth * 0.15, rayWave) * inFan * inRad * 0.92;

    float tipArc = exp(-abs(r - maxLen * 0.93) / 0.85) * inFan * (0.45 + 0.55 * smoothstep(0.75, 0.08, rayWave));
    float gossamer = inFan * smoothstep(maxLen, maxLen * 0.25, r) * smoothstep(1.5, 4.5, r) * 0.20;

    return float3(saturate(hairs + tipArc * 0.85 + gossamer), stalk, golden);
}

// Composite one dandelion seed cleanly (luminous white in dark taskbar, crisp pastel-sakura & gold over white windows)
void blendSeed(
    float3 s,
    float vis,
    float colorMix,
    float aboveBar,
    float3 pastelA,
    float3 pastelC,
    inout float3 col,
    inout float alpha)
{
    float sMask = saturate(s.x + s.y + s.z);
    if (sMask <= 0.001 || vis <= 0.001) return;

    float3 seedPastel = lerp(pastelA, pastelC, colorMix);
    float3 fluffDark  = lerp(float3(0.98, 0.97, 1.00), seedPastel, 0.16);
    float3 fluffSky   = lerp(float3(0.95, 0.82, 0.92), seedPastel, 0.58);
    float3 fluffCol   = lerp(fluffDark, fluffSky, aboveBar);

    float3 stalkCol   = lerp(float3(0.88, 0.84, 0.78), lerp(float3(0.74, 0.58, 0.70), seedPastel, 0.52), aboveBar);
    float3 acheneCol  = float3(1.00, 0.75, 0.22);

    float3 sCol = fluffCol * s.x * 0.95
                + stalkCol * s.y * 0.78
                + acheneCol * s.z * 0.98;
    float sA = saturate(max(s.x * 0.86, max(s.y * 0.78, s.z * 0.96))) * vis;

    col = col * (1.0 - sA * 0.85) + sCol * vis;
    alpha = saturate(alpha + sA * (1.0 - alpha * 0.45));
}

// ============================================================================
// UPPER SKY LAYERS (UNCHANGED — 200-DIP FULL-WIDTH 3-LAYER PARALLAX)
// ============================================================================
void addParallaxSeedLayer(
    float2 px,
    float t,
    float barH,
    float aboveBar,
    float cellSize,
    float2 windVel,
    float density,
    float minScale,
    float maxScale,
    float layerOpacity,
    float2 layerSeed,
    float3 pastelA,
    float3 pastelC,
    inout float3 col,
    inout float alpha)
{
    float2 worldP = px - windVel * t;
    float2 gridF = worldP / cellSize;
    float2 baseCell = floor(gridF - 0.5);

    [loop]
    for (int dy = 0; dy <= 1; dy++)
    {
        [loop]
        for (int dx = 0; dx <= 1; dx++)
        {
            float2 cell = baseCell + float2((float)dx, (float)dy);
            float3 h = hash32(cell + layerSeed);
            if (h.x > density) continue;

            float phase = h.x * 40.0 + h.y * 19.0;
            float2 jitter = lerp(float2(0.28, 0.28), float2(0.72, 0.72), h.yz);
            jitter += float2(sin(t * 0.75 + phase), cos(t * 1.10 + phase * 1.3)) * 0.055;

            float2 seedWorldPos = (cell + jitter) * cellSize;
            float2 dp = worldP - seedWorldPos;

            float sc = lerp(minScale, maxScale, frac(h.z * 7.31));
            float maxR = 14.5 * sc;
            if (dot(dp, dp) > maxR * maxR) continue;

            float seedScreenY = seedWorldPos.y + windVel.y * t;
            float lowFade = smoothstep(8.0, 28.0, seedScreenY);
            if (lowFade <= 0.001) continue;

            float tilt = -0.34 - 0.32 * h.y + sin(t * (1.2 + 0.6 * h.z) + phase) * 0.22;
            float3 s = drawFastSeed(dp, sc, tilt, t * 2.1 + phase);
            blendSeed(s, layerOpacity * lowFade, h.y, aboveBar, pastelA, pastelC, col, alpha);
        }
    }
}

void addParallaxSparkLayer(
    float2 px,
    float t,
    float cellSize,
    float2 windVel,
    float density,
    float2 layerSeed,
    inout float3 col,
    inout float alpha)
{
    float2 worldP = px - windVel * t;
    float2 baseCell = floor(worldP / cellSize - 0.5);

    [loop]
    for (int dy = 0; dy <= 1; dy++)
    {
        [loop]
        for (int dx = 0; dx <= 1; dx++)
        {
            float2 cell = baseCell + float2((float)dx, (float)dy);
            float3 h = hash32(cell + layerSeed);
            if (h.x > density) continue;

            float phase = h.x * 53.0 + h.y * 23.0;
            float2 jitter = lerp(float2(0.25, 0.25), float2(0.75, 0.75), h.yz);
            jitter += float2(sin(t * 0.9 + phase), cos(t * 1.4 + phase)) * 0.06;

            float2 dm = worldP - (cell + jitter) * cellSize;
            if (dot(dm, dm) > 18.0) continue;

            float twinkle = 0.50 + 0.50 * sin(t * (2.4 + 2.2 * h.z) + phase);
            float rDot = 1.05 + 0.70 * h.z;
            float mote = smoothstep(rDot + 0.45, rDot * 0.18, length(dm)) * twinkle * 0.85;

            float3 moteCol = (h.y > 0.44)
                ? float3(1.00, 0.54, 0.76)
                : float3(1.00, 0.76, 0.24);

            col = col * (1.0 - mote * 0.85) + moteCol * mote;
            alpha = saturate(max(alpha, mote * 0.88));
        }
    }
}

// ============================================================================
// NEW TASKBAR MOTION LAYERS (STRICTLY INSIDE TASKBAR, O(1) FAST & SMOOTH 60FPS!)
// ============================================================================

// Taskbar Layer 1: Low-altitude dandelion seeds gliding right across the middle of the taskbar
void addTaskbarSeedBand(
    float2 px,
    float t,
    float barH,
    float inBar,
    float cellW,
    float speedX,
    float density,
    float minScale,
    float maxScale,
    float bandOpacity,
    float seedOffset,
    float3 pastelA,
    float3 pastelC,
    inout float3 col,
    inout float alpha)
{
    if (inBar <= 0.001) return;

    float scrollX = px.x - speedX * t;
    float baseC = floor(scrollX / cellW);

    [loop]
    for (int dx = -1; dx <= 1; dx++)
    {
        float cid = baseC + (float)dx;
        float3 h = hash32(float2(cid, seedOffset));
        if (h.x > density) continue;

        float phase = h.x * 37.0 + h.y * 17.0;
        float cx = (cid + lerp(0.20, 0.80, h.y)) * cellW;
        // Graceful bobbing strictly within the comfortable vertical middle of the taskbar
        float baseY = lerp(barH * 0.28, barH * 0.84, h.z);
        float cy = baseY + sin(t * (1.4 + 0.7 * h.x) + phase) * (barH * 0.11);

        float sc = lerp(minScale, maxScale, frac(h.z * 5.71));
        float2 dp = float2(scrollX - cx, px.y - cy);
        float maxR = 14.5 * sc;
        if (dot(dp, dp) > maxR * maxR) continue;

        float tilt = -0.45 - 0.30 * h.y + sin(t * (1.6 + 0.6 * h.z) + phase) * 0.24;
        float3 s = drawFastSeed(dp, sc, tilt, t * 2.5 + phase);
        blendSeed(s, bandOpacity * inBar, h.y, 0.0, pastelA, pastelC, col, alpha);
    }
}

// Taskbar Layer 2: Drifting Fireflies & Glowing Pollen with Whisper-Thin Wind Trails
void addTaskbarFireflies(
    float2 px,
    float t,
    float barH,
    float bt,
    float inBar,
    float cellW,
    float speedX,
    float density,
    float seedOffset,
    float3 pastelA,
    float3 pastelC,
    inout float3 col,
    inout float alpha)
{
    if (inBar <= 0.001) return;

    float scrollX = px.x - speedX * t;
    float baseC = floor(scrollX / cellW);

    [loop]
    for (int dx = -1; dx <= 1; dx++)
    {
        float cid = baseC + (float)dx;
        float3 h = hash32(float2(cid, seedOffset));
        if (h.x > density) continue;

        float phase = h.x * 61.0 + h.y * 29.0;
        float cx = (cid + lerp(0.18, 0.82, h.y)) * cellW;
        float cy = lerp(barH * 0.18, barH * 0.88, h.z)
                 + sin(t * (1.8 + 1.1 * h.x) + phase) * (barH * 0.14);

        float2 dp = float2(scrollX - cx, px.y - cy);
        // Quick reject (allows trailing wind tail up to 16px to the left)
        if (dp.x > 6.0 || dp.x < -18.0 || abs(dp.y) > 7.0) continue;

        float twinkle = 0.45 + 0.55 * sin(t * (3.2 + 2.8 * h.z) + phase);
        float pulse = twinkle * (0.78 + 0.28 * bt);

        // Glowing firefly head + soft micro-halo
        float dHead = length(dp);
        float coreR = 1.15 + 0.85 * h.z;
        float head = exp(-dHead * dHead / (coreR * coreR)) * 0.95
                   + exp(-dHead / (coreR * 2.1)) * 0.35;

        // Whisper-thin breeze tail stretching slightly behind (upwind to the left)
        float tailLen = 8.0 + 7.0 * h.x;
        float inTail = smoothstep(-tailLen, -0.5, dp.x) * smoothstep(0.6, -0.4, dp.x);
        float tail = exp(-abs(dp.y) / 0.85) * inTail * (1.0 - saturate(-dp.x / tailLen)) * 0.48;

        float vis = saturate(head + tail) * pulse * inBar;
        if (vis <= 0.002) continue;

        // Mix of warm golden fireflies, soft sakura pollen, and luminous pearl motes
        float3 fCol = (h.y < 0.45)
            ? float3(1.00, 0.84, 0.42)                    // Warm firefly gold
            : ((h.y < 0.78) ? lerp(float3(1.00, 0.72, 0.86), pastelC, 0.45)
                            : lerp(float3(0.95, 0.98, 1.00), pastelA, 0.30));

        col += fCol * vis * 0.85;
        alpha = saturate(alpha + vis * 0.65);
    }
}

// ============================================================================
// MAIN FLUFFY DANDELION PUFFBALL AT PLAYHEAD
// ============================================================================
void drawFluffyDandelion(
    float2 px,
    float2 headPos,
    float barH,
    float t,
    float lvl,
    float bt,
    float sway,
    float3 accentPastel,
    float aboveBar,
    out float3 colOut,
    out float alphaOut)
{
    colOut = float3(0.0, 0.0, 0.0);
    alphaOut = 0.0;

    float rScale = clamp(barH / 44.0, 0.78, 1.30);
    float outerR = (15.5 + 0.8 * lvl + 0.7 * bt) * rScale;

    float2 sBase = float2(headPos.x - sway * 0.40, 0.0);
    float2 sMid  = float2(headPos.x - sway * 0.14, headPos.y * 0.50);
    float dStem = min(sdSegment(px, sBase, sMid), sdSegment(px, sMid, headPos - float2(0.0, 1.0 * rScale)));
    float stemMask = smoothstep(1.50 * rScale, 0.38 * rScale, dStem) * step(px.y, headPos.y);
    float stemHi   = smoothstep(0.65 * rScale, 0.12 * rScale, dStem) * step(px.y, headPos.y);
    float3 stemCol = lerp(float3(0.42, 0.78, 0.60), float3(0.86, 0.96, 0.88), stemHi);

    colOut = stemCol * stemMask * 0.88;
    alphaOut = stemMask * 0.92;

    float2 d = px - headPos;
    float dist = length(d);
    if (dist > outerR * 1.55) return;

    float ang = atan2(d.y, d.x);
    float rotA = ang + sin(t * 0.55) * 0.025;

    float scallop = 1.0
        + 0.055 * sin(rotA * 18.0)
        + 0.040 * cos(rotA * 11.0 + 0.8)
        + 0.030 * sin(rotA * 29.0 - 0.5)
        - smoothstep(0.42, 0.98, cos(ang - 0.15)) * 0.09;
    float puffR = outerR * scallop;

    float ray34 = pow(saturate(abs(cos(rotA * 17.0))), 6.0);
    float ray19 = pow(saturate(abs(sin(rotA * 9.5 + 0.4))), 5.0);
    float hairBand = smoothstep(2.2 * rScale, 4.5 * rScale, dist) * smoothstep(puffR + 0.8 * rScale, puffR - 2.0 * rScale, dist);
    float silkRays = (ray34 * 0.42 + ray19 * 0.24) * hairBand;

    float outerBand = exp(-pow((dist - puffR * 0.94) / (2.35 * rScale), 2.0));
    float midBand   = exp(-pow((dist - puffR * 0.72) / (2.10 * rScale), 2.0));
    float cloudTex1 = 0.55 + 0.45 * pow(saturate(0.5 + 0.5 * cos(rotA * 22.0 + sin(dist * 0.6))), 1.3);
    float cloudTex2 = 0.50 + 0.50 * pow(saturate(0.5 + 0.5 * sin(rotA * 16.0 - 1.1)), 1.4);

    float outerFluff = outerBand * cloudTex1 * 0.88;
    float innerFluff = midBand * cloudTex2 * 0.42;
    float mistyBody  = smoothstep(puffR * 1.02, puffR * 0.15, dist) * 0.20 * (1.0 - aboveBar);

    float puff = saturate(silkRays + outerFluff + innerFluff + mistyBody);

    float2 budP = (d - float2(0.0, -0.4 * rScale)) * float2(1.18, 0.86);
    float budDist = length(budP);
    float budCore = smoothstep(3.4 * rScale, 0.7 * rScale, budDist);
    float warmHeart = exp(-dist / ((6.5 + 1.0 * bt) * rScale)) * (0.48 + 0.14 * bt) * (1.0 - aboveBar);

    float3 fluffCol = lerp(float3(0.98, 0.97, 1.00), lerp(float3(0.96, 0.84, 0.92), accentPastel, 0.45), aboveBar);
    float3 budCol   = lerp(float3(0.99, 0.76, 0.30), float3(1.00, 0.96, 0.76), smoothstep(2.6 * rScale, 0.4 * rScale, budDist));

    float3 flowerCol = fluffCol * puff * (0.92 + 0.08 * bt)
                     + budCol * (budCore * 1.00 + warmHeart * 0.82);
    float flowerA = saturate(max(puff * 0.90, budCore * 0.98 + warmHeart * 0.58));

    colOut = colOut * (1.0 - flowerA * 0.85) + flowerCol;
    alphaOut = saturate(max(alphaOut, flowerA));
}

float4 main(float2 uv : TEXCOORD) : COLOR
{
    float barW = max(size.x, 1.0);
    float barH = max(size.y, 1.0);

    float r = rise(uv);
    float2 px = float2(uv.x * barW, r * barH);

    float skyPx = max(headroom(), 0.0);
    float hasSky = step(2.0, skyPx);
    float aboveBar = smoothstep(barH - 2.0, barH + 10.0, px.y);
    float topFade = hasSky > 0.5
        ? smoothstep(barH + skyPx, barH + skyPx * 0.72, px.y)
        : 1.0;

    float t = time;
    float lvl = saturate(level);
    float bt = saturate(beat);

    float headX = clamp(progress * barW, 24.0, barW - 24.0);

    float3 cA = colorA.rgb;
    float3 cB = colorB.rgb;
    float3 cC = colorC.rgb;
    float3 pastelA = cleanPastel(cA);
    float3 pastelC = cleanPastel(cC);

    float3 col = float3(0.0, 0.0, 0.0);
    float alpha = 0.0;

    // -------------------------------------------------------------------------
    // 1. TASKBAR ZONE (px.y <= barH):
    //    Gentle Veil + Flowing Wind Pulses + Swaying Meadow Waves + Dewdrop Tips
    // -------------------------------------------------------------------------
    float inBar = smoothstep(barH + 1.0, barH - 5.0, px.y);
    if (inBar > 0.001)
    {
        float playedMask = smoothstep(headX + 16.0, headX - 24.0, px.x);
        float headGlow   = exp(-abs(px.x - headX) / 140.0);

        // Soft, airy progress veil (keeps wallpaper clear & gentle)
        float3 progGrad = lerp(lerp(cB, cA, saturate(uv.x / max(progress, 0.05))), cC, headGlow * 0.35);
        float vertWash = lerp(0.18, 0.04, saturate(px.y / barH));
        float washAlpha = (playedMask * vertWash + (1.0 - playedMask) * 0.025 * (1.0 - saturate(px.y / barH))) * (0.90 + 0.10 * lvl);
        float spot = headGlow * smoothstep(barH, 0.0, px.y) * (0.12 + 0.05 * bt);

        col += progGrad * (washAlpha + spot * 0.55) + pastelC * spot * 0.25;
        alpha = saturate(max(alpha, (washAlpha + spot * 0.45) * inBar));

        // 3 Flowing Silk Wind Ribbons with VISIBLE traveling light gusts (smooth motion!)
        float wSample = wave(uv.x) * (2.2 + 3.0 * lvl);
        float windY1 = barH * 0.36 + sin(px.x * 0.0085 - t * 1.45) * (barH * 0.16) + wSample * 0.45;
        float windY2 = barH * 0.58 + cos(px.x * 0.0065 - t * 1.05 + 1.6) * (barH * 0.15) - wSample * 0.32;
        float windY3 = barH * 0.76 + sin(px.x * 0.0110 - t * 1.85 + 3.1) * (barH * 0.10) + wSample * 0.22;

        // Traveling luminous wind-gust pulses gliding swiftly left-to-right along each ribbon
        float gust1 = 0.28 + 0.72 * pow(0.5 + 0.5 * sin(px.x * 0.014 - t * 3.4), 3.0);
        float gust2 = 0.25 + 0.75 * pow(0.5 + 0.5 * sin(px.x * 0.011 - t * 2.5 + 2.1), 3.0);
        float gust3 = 0.20 + 0.80 * pow(0.5 + 0.5 * sin(px.x * 0.018 - t * 4.2 + 4.0), 4.0);

        float r1 = exp(-abs(px.y - windY1) / 1.75) * (0.16 + 0.16 * playedMask + 0.08 * headGlow) * gust1;
        float r2 = exp(-abs(px.y - windY2) / 2.25) * (0.12 + 0.10 * playedMask) * gust2;
        float r3 = exp(-abs(px.y - windY3) / 1.50) * (0.10 + 0.08 * playedMask) * gust3;

        float3 windCol1 = lerp(float3(1.00, 0.90, 0.96), pastelC, 0.40);
        float3 windCol2 = lerp(float3(0.88, 0.94, 1.00), pastelA, 0.42);
        float3 windCol3 = float3(1.00, 0.94, 0.82);

        col += (windCol1 * r1 + windCol2 * r2 + windCol3 * r3) * inBar;
        alpha = saturate(alpha + (r1 * 0.58 + r2 * 0.44 + r3 * 0.42) * inBar);

        // Swaying Audio Meadow Grass + Rolling Wind Gusts + Glowing Dewdrop Tips!
        float grassSpacing = 5.5;
        float cellX = floor(px.x / grassSpacing);
        float localX = frac(px.x / grassSpacing) - 0.5;
        float gSeed = hash11(cellX * 1.73 + 5.0);
        float spec = spectrum(saturate(frac(cellX * 0.019) * 0.85 + 0.05));
        // Rolling wind gust sweeping smoothly across the grass from left to right
        float windGust = sin(cellX * 0.16 - t * 2.6) * 0.5 + 0.5;
        float bladeH = (3.0 + gSeed * 3.2 + spec * (8.5 + 3.0 * bt) + windGust * 2.2) * (0.42 + 0.58 * playedMask);

        // Curving wind bend that increases toward the tip of each grass blade
        float yNorm = saturate(px.y / max(bladeH, 1.0));
        float bend = yNorm * yNorm * (0.28 + 0.34 * windGust);
        float bladeWidth = lerp(0.20, 0.06, yNorm);
        float blade = smoothstep(bladeWidth + 0.08, bladeWidth * 0.3, abs(localX - bend))
                    * smoothstep(bladeH + 0.9, bladeH - 1.2, px.y);

        float3 grassCol = lerp(
            lerp(float3(0.42, 0.86, 0.66), pastelA, 0.35),
            lerp(pastelC, float3(1.00, 0.92, 0.78), 0.35),
            yNorm);
        col += grassCol * blade * (0.30 + 0.26 * playedMask) * inBar;
        alpha = saturate(alpha + blade * 0.36 * inBar);

        // Tiny glowing pollen/dewdrop tip dancing on taller grass blades!
        if (gSeed > 0.42)
        {
            float2 tipPos = float2((cellX + 0.5 + (0.28 + 0.34 * windGust)) * grassSpacing, bladeH);
            float dTip = length(px - tipPos);
            float dew = exp(-dTip * dTip / 1.9) * (0.45 + 0.55 * windGust) * (0.35 + 0.65 * playedMask);
            float3 dewCol = lerp(float3(1.00, 0.90, 0.58), pastelC, frac(gSeed * 7.1));
            col += dewCol * dew * 0.75 * inBar;
            alpha = saturate(alpha + dew * 0.55 * inBar);
        }
    }

    // -------------------------------------------------------------------------
    // 2. TASKBAR LIVELY MOTION LAYERS (LOW-ALTITUDE SEEDS + FIREFLIES WITH WIND TRAILS)
    // -------------------------------------------------------------------------
    float barScale = clamp(barH / 44.0, 0.82, 1.22);

    // Low-altitude dandelion seeds gliding right through the taskbar (2 depth speeds!)
    addTaskbarSeedBand(
        px, t, barH, inBar,
        128.0, 24.0, 0.68, 0.56 * barScale, 0.80 * barScale, 0.72, 17.3,
        pastelA, pastelC, col, alpha);
    addTaskbarSeedBand(
        px, t, barH, inBar,
        104.0, 42.0, 0.66, 0.78 * barScale, 1.05 * barScale, 0.90, 53.9,
        pastelA, pastelC, col, alpha);

    // Glowing fireflies & sakura/gold pollen streaming through the taskbar with subtle wind tails!
    addTaskbarFireflies(
        px, t, barH, bt, inBar,
        58.0, 34.0, 0.62, 91.7, pastelA, pastelC, col, alpha);
    addTaskbarFireflies(
        px, t, barH, bt, inBar,
        84.0, 54.0, 0.55, 137.1, pastelA, pastelC, col, alpha);

    // -------------------------------------------------------------------------
    // 3. MAIN FLUFFY DANDELION PUFFBALL AT PLAYHEAD
    // -------------------------------------------------------------------------
    float sway = sin(t * 1.35) * 2.2 + sin(t * 2.45) * 0.6;
    float headY = barH * (hasSky > 0.5 ? 0.58 : 0.54) + sin(t * 1.05) * 0.8;
    float2 headPos = float2(headX + sway, headY);

    float3 flowerCol;
    float flowerAlpha;
    drawFluffyDandelion(px, headPos, barH, t, lvl, bt, sway, pastelA, aboveBar, flowerCol, flowerAlpha);
    col = col * (1.0 - flowerAlpha * 0.80) + flowerCol;
    alpha = saturate(max(alpha, flowerAlpha));

    // -------------------------------------------------------------------------
    // 4. FULL-SKY 3-LAYER PARALLAX DANDELION FIELD (UNCHANGED — 200-DIP FULL WIDTH!)
    // -------------------------------------------------------------------------
    float heightSoft = hasSky > 0.5
        ? lerp(1.00, 0.78, saturate((px.y - barH) / max(skyPx, 1.0)))
        : 1.0;

    addParallaxSeedLayer(
        px, t, barH, aboveBar,
        62.0, float2(18.0, 5.5), 0.46,
        0.48 * barScale, 0.68 * barScale, 0.68 * heightSoft,
        float2(11.3, 47.7), pastelA, pastelC, col, alpha);

    addParallaxSeedLayer(
        px, t, barH, aboveBar,
        88.0, float2(30.0, 8.5), 0.56,
        0.72 * barScale, 0.98 * barScale, 0.86 * heightSoft,
        float2(73.1, 19.4), pastelA, pastelC, col, alpha);

    addParallaxSeedLayer(
        px, t, barH, aboveBar,
        130.0, float2(46.0, 12.0), 0.52,
        1.00 * barScale, 1.28 * barScale, 0.96 * heightSoft,
        float2(141.9, 89.2), pastelA, pastelC, col, alpha);

    addParallaxSparkLayer(px, t, 74.0, float2(22.0, 7.0), 0.42, float2(211.7, 53.3), col, alpha);

    // -------------------------------------------------------------------------
    // 5. STREAM OF 14 SEEDS LAUNCHING DIRECTLY FROM THE DANDELION FLOWER INTO THE SKY
    // -------------------------------------------------------------------------
    float maxLift = hasSky > 0.5 ? (skyPx * 0.92) : (barH * 0.36);

    [loop]
    for (int i = 0; i < 14; i++)
    {
        float fi = (float)i;
        float2 rnd = hash21(fi * 19.31 + 4.7);
        float rnd3 = hash11(fi * 37.17 + 13.1);

        float cycleDur = 5.6 + rnd.x * 4.5;
        float life = frac(t / cycleDur + rnd.y);

        float seedVis = smoothstep(0.0, 0.08, life) * smoothstep(1.0, 0.72, life) * heightSoft;

        float travelX = life * (140.0 + rnd.x * 280.0);
        float sx = headPos.x + 6.0 + travelX;
        if (sx > barW + 24.0) sx = fmod(sx - 24.0, barW) - 10.0;

        float liftCurve = pow(life, 0.76);
        float skyBand = hasSky > 0.5 ? lerp(0.14, 0.96, rnd3) : lerp(-0.18, 0.74, rnd3);
        float waveFloat = sin(t * (1.1 + rnd.x * 0.8) + fi * 2.3) * 4.2;
        float sy = max(headPos.y + liftCurve * maxLift * skyBand + waveFloat, 10.0);

        float scale = lerp(0.64, 1.15, rnd.x) * barScale;
        float2 dp = px - float2(sx, sy);
        float maxR = 14.5 * scale;
        if (dot(dp, dp) > maxR * maxR) continue;

        float tilt = -0.32 - 0.32 * rnd.y + sin(t * (1.35 + rnd.x * 0.7) + fi * 1.9) * 0.22;
        float3 s = drawFastSeed(dp, scale, tilt, t * 2.2 + fi * 1.5);
        blendSeed(s, seedVis, rnd.x, aboveBar, pastelA, pastelC, col, alpha);
    }

    col *= topFade;
    alpha *= topFade;

    return paint(col, alpha);
}