Hố đen upgrade version

của Thắng Phạm, thanh tiến trình

Dành cho ae nào thích không gian, vũ trụ

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ó.

39 lượt tải Tải file, 19.2 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 e6e10d628469dcc256794c82e0eba9a054c41bbc2a6fdc2b38556e856d1ddcb3

//! name: Black Hole - V3 Aurora
//! author: Rinz
//! kind: progress
//! description: Compact black hole with twinkling stars, spectral diffraction, iridescent light ribbons and optical lens flares.
//! headroom: 96

static const float USE_APP_COLOR = 0.0;
static const float HOLE_SCALE = 1.12;
// Optical accents only. Black-hole scale, center and headroom are unchanged.
static const float OPTICS = 0.85;

float3 prismColor(float phase)
{
    return 0.55 + 0.45 * cos(6.2831853 * (phase + float3(0.0, 0.666667, 0.333333)));
}

float hash1(float n)
{
    n = frac(n * 0.1031);
    n *= n + 33.33;
    n *= n + n;
    return frac(n);
}

void layer(inout float3 acc, inout float cover, float3 rgb, float a)
{
    a = saturate(a);
    acc = rgb * a + acc * (1.0 - a);
    cover = a + cover * (1.0 - a);
}

float2 rot(float2 p, float a)
{
    float c = cos(a), s = sin(a);
    return float2(c * p.x + s * p.y, -s * p.x + c * p.y);
}

float hash21(float2 p)
{
    return hash1(dot(p, float2(127.1, 311.7)));
}

float vnoise(float2 p)
{
    float2 i = floor(p);
    float2 f = frac(p);
    f = f * f * (3.0 - 2.0 * f);
    float a = hash21(i);
    float b = hash21(i + float2(1.0, 0.0));
    float c = hash21(i + float2(0.0, 1.0));
    float d = hash21(i + float2(1.0, 1.0));
    return lerp(lerp(a, b, f.x), lerp(c, d, f.x), f.y);
}

float fbm(float2 p)
{
    float v = 0.0;
    float amp = 0.5;
    [unroll]
    for (int i = 0; i < 3; i++)
    {
        v += amp * vnoise(p);
        p = p * 2.03 + float2(15.7, 8.9);
        amp *= 0.5;
    }
    return v;
}

float3 renderStarLayer(float2 p, float cellScale, float seed, float3 tintA, float3 tintB, float density, float sizeScale)
{
    float2 grid = p / cellScale;
    float2 id = floor(grid);
    float2 gv = frac(grid) - 0.5;

    float nId = dot(id, float2(41.0, 289.0)) + seed * 113.0;
    float h1 = hash1(nId);
    float h2 = hash1(nId + 17.3);
    float h3 = hash1(nId + 31.7);

    float present = step(1.0 - density, h1);
    float2 offset = (float2(h2, h3) - 0.5) * 0.52;
    float2 d = (gv - offset) * cellScale;

    float r2 = dot(d, d);
    float sz = max(0.48, lerp(0.72, 1.42, h2) * sizeScale);
    float core = exp(-r2 / (sz * sz));
    float halo = 0.27 * exp(-r2 / (sz * sz * 5.0));

    float flareMask = step(0.94, h1) * smoothstep(0.55, 0.95, sizeScale);
    float crossFlare = (exp(-abs(d.x) * 1.4) * exp(-abs(d.y) * 0.35) + exp(-abs(d.y) * 1.4) * exp(-abs(d.x) * 0.35)) * 0.35 * flareMask;

    float phase = time * (1.25 + h3 * 3.6) + h1 * 45.0;
    float twinkle = 0.25 + 0.75 * pow(0.5 + 0.5 * sin(phase), 1.7);
    float flash = pow(0.5 + 0.5 * sin(time * (2.0 + h2 * 2.8) + h3 * 39.0), 10.0);
    twinkle = saturate(twinkle + flash * 0.40);
    float3 col = lerp(tintA, tintB, h3);
    col = lerp(col, float3(1.0, 0.99, 0.96), saturate(core + crossFlare));

    // Rare bright stars split into colored diffraction spikes.
    float3 light = col * (core + halo + crossFlare);
    float prismMask = step(0.92, h1) * smoothstep(0.72, 0.98, sizeScale);
    float2 ray = rot(d, 0.35 + h3 * 1.25);
    float ray1 = exp(-abs(ray.x) * 2.4 - abs(ray.y) * 0.52);
    float ray2 = exp(-abs(ray.y) * 2.4 - abs(ray.x) * 0.52);
    float rayGate = smoothstep(0.6, 1.7, length(d));
    float3 rayCol = prismColor(h2 + length(d) * 0.16 + time * 0.07);
    light += rayCol * (ray1 + ray2) * rayGate * prismMask * (0.25 + 0.55 * flash) * OPTICS;
    return light * present * twinkle;
}

float4 main(float2 uv : TEXCOORD) : COLOR
{
    float w = size.x;
    float u = size.y;
    float2 px = float2(uv.x * w, rise(uv) * u);

    float live = saturate(playing);
    float vol = saturate(level) * live;
    float flick = saturate(beat) * live;

    float head = saturate(progress) * w;
    float margin = u * 1.35;
    float hx = clamp(head, margin, max(w - margin, margin));
    // Keep the previous compact headroom center and progress position.
    // Scale only the black-hole geometry around that unchanged center.
    float hr = max(headroom(), 0.0);
    float hy = u * 0.50 + min(u * 0.45, hr * 0.75);

    float bottomFade = smoothstep(0.0, u * 0.12, px.y);
    float trackEdge = bottomFade * smoothstep(u, u * 0.88, px.y);
    float edge = bottomFade * smoothstep(u + hr, u + hr - u * 0.12, px.y);
    // Avoid a broad dark shadow over the desktop above the taskbar.
    float shadowFade = 1.0 - smoothstep(u, u * 1.45, px.y);
    float played = smoothstep(head + u * 0.25, head - u * 0.65, px.x);
    float trackAlpha = lerp(0.15, 0.78, played) * trackEdge;

    float3 spaceDark = float3(0.025, 0.035, 0.075);
    float3 nebCyan   = float3(0.06, 0.38, 0.68);
    float3 nebViolet = float3(0.42, 0.12, 0.52);
    float3 nebAmber  = float3(0.88, 0.42, 0.14);

    float3 diskOuter = lerp(float3(0.80, 0.18, 0.03), colorA.rgb, USE_APP_COLOR * 0.65);
    float3 diskMid   = lerp(float3(1.00, 0.56, 0.12), colorC.rgb, USE_APP_COLOR * 0.65);
    float3 diskHot   = float3(1.00, 0.96, 0.88);

    float3 acc = float3(0.0, 0.0, 0.0);
    float cover = 0.0;

    float2 d = px - float2(hx, hy);
    float2 q = d / (u * HOLE_SCALE);
    float r = length(q);
    float lensPull = 0.13 / (r * r + 0.048) * smoothstep(2.4, 0.18, r);
    float2 lensedPx = px - d * lensPull;

    float2 nebUV = float2((lensedPx.x - time * u * 0.16) / (u * 2.1), (lensedPx.y - u * 0.50) / (u * 0.90));
    float warp = fbm(nebUV * 1.35 - float2(time * 0.05, 0.0));
    float cloud = fbm(nebUV * 2.3 + warp * 1.5);

    float ridge = 1.0 - abs(2.0 * vnoise(nebUV * 3.8 + warp * 1.4) - 1.0);
    float filament = pow(saturate(ridge), 4.5) * smoothstep(0.35, 0.70, cloud);
    float dustLane = smoothstep(0.42, 0.72, fbm(nebUV * 3.2 - warp + 5.1));

    float3 bgCol = spaceDark;
    float nebMask = smoothstep(0.30, 0.76, cloud);
    float3 nebMix = lerp(nebCyan, nebViolet, smoothstep(0.25, 0.75, warp));
    nebMix = lerp(nebMix, nebAmber, pow(nebMask, 2.2) * 0.75);

    bgCol += nebMix * nebMask * 0.80;
    bgCol += lerp(nebAmber, diskHot, 0.45) * filament * (0.55 + 0.35 * vol);
    bgCol *= lerp(1.0, 0.28, dustLane * smoothstep(0.85, 0.0, abs((px.y - u * 0.50) / u)));

    layer(acc, cover, bgCol, trackAlpha);

    // Soft spectral ribbons: slow, intermittent interference colors within the track.
    // No opaque rectangle or desktop-wide glow in the headroom area.
    float2 opticalUV = lensedPx / u;
    float opticalFlow = opticalUV.x * 0.36 - time * 0.26;
    float bandY = 0.53 + 0.17 * sin(opticalUV.x * 0.23 - time * 0.42)
                       + 0.07 * sin(opticalUV.x * 0.62 + time * 0.33);
    float bandDist = opticalUV.y - bandY;
    float bandSoft = exp(-pow(bandDist / 0.14, 2.0));
    float bandFine = exp(-pow((bandDist + 0.038) / 0.035, 2.0));
    float bandGate = pow(saturate(0.5 + 0.5 * sin(opticalFlow)), 2.4);
    float3 bandColor = prismColor(opticalUV.x * 0.052 + bandDist * 1.6 + time * 0.055);
    float bandVis = trackEdge * smoothstep(0.28, 0.65, r) * lerp(0.58, 1.0, played);
    layer(acc, cover, bandColor, (bandSoft * 0.20 + bandFine * 0.21) * bandGate * bandVis * OPTICS * (0.8 + 0.2 * vol));

    // A second, thinner aurora ribbon with independent slow motion.
    // Keep both ribbons confined to the taskbar and behind the stars.
    float auroraY = 0.29 + 0.10 * sin(opticalUV.x * 0.29 + time * 0.28 + 1.7)
                         + 0.055 * sin(opticalUV.x * 0.71 - time * 0.22);
    float auroraDist = opticalUV.y - auroraY;
    float auroraGlow = exp(-pow(auroraDist / 0.105, 2.0));
    float auroraRim = exp(-pow((auroraDist - 0.020) / 0.024, 2.0));
    float auroraGate = 0.18 + 0.82 * pow(saturate(0.5 + 0.5 * sin(opticalUV.x * 0.31 + time * 0.19 + 2.1)), 2.0);
    float3 auroraColor = prismColor(opticalUV.x * 0.043 - time * 0.038 + auroraDist * 1.7 + 0.34);
    auroraColor = lerp(auroraColor, float3(0.20, 0.86, 0.78), 0.24);
    layer(acc, cover, auroraColor, (auroraGlow * 0.11 + auroraRim * 0.15) * auroraGate * bandVis * OPTICS * (0.85 + 0.15 * vol));

    // Three independently drifting layers of small, irregularly twinkling stars.
    float2 starPx1 = float2(lensedPx.x - time * u * 0.075, lensedPx.y);
    float2 starPx2 = float2(lensedPx.x - time * u * 0.16, lensedPx.y);
    float2 starPx3 = float2(lensedPx.x - time * u * 0.035, lensedPx.y + u * 0.11);
    float3 stars = renderStarLayer(starPx1, max(5.0, u * 0.39), 1.0, float3(0.60, 0.82, 1.0), float3(1.0, 0.91, 0.73), 0.47, 1.0);
    stars += renderStarLayer(starPx2, max(4.0, u * 0.27), 2.0, float3(0.65, 0.80, 1.0), float3(1.0, 0.78, 0.62), 0.48, 0.78) * 0.80;
    stars += renderStarLayer(starPx3, max(3.5, u * 0.18), 5.0, float3(0.70, 0.84, 1.0), float3(0.94, 0.88, 1.0), 0.38, 0.60) * 0.58;

    float starVis = smoothstep(0.22, 0.38, r) * lerp(0.48, 1.0, played) * trackEdge;
    float starLum = max(stars.r, max(stars.g, stars.b));
    layer(acc, cover, stars / max(0.001, starLum), saturate(starLum) * starVis);

    // One shooting-star event per 7-second slot, with seeded variation
    // in start time, direction, location, brightness and trail length.
    float meteorSlot = floor(time / 7.0);
    float meteorClock = time - meteorSlot * 7.0;
    float mA = hash1(meteorSlot * 13.71 + 17.1);
    float mB = hash1(meteorSlot * 31.19 + 91.7);
    float mC = hash1(meteorSlot * 47.33 + 51.3);
    float mD = hash1(meteorSlot * 73.17 + 25.6);
    float meteorAge = meteorClock - lerp(0.65, 3.05, mA);
    float meteorDuration = lerp(0.85, 1.35, mC) / 0.70 * 1.25;
    if (meteorAge >= 0.0 && meteorAge < meteorDuration)
    {
        float mt = saturate(meteorAge / meteorDuration);
        float md = (mB < 0.5) ? -1.0 : 1.0;
        float travel = min(w * 0.675, u * lerp(8.75, 13.75, mD));
        float pad = min(u * 0.8, w * 0.1);
        float startLeft = lerp(pad, max(pad, w - travel - pad), mC);
        float startX = (md > 0.0) ? startLeft : w - startLeft;
        float2 mStart = float2(startX, u * lerp(0.65, 0.81, mA));
        float2 mMove = float2(md * travel, -u * lerp(0.26, 0.43, mD));
        float2 mDir = normalize(mMove);
        float2 mp = px - (mStart + mMove * mt);
        float along = dot(mp, mDir);
        float across = dot(mp, float2(-mDir.y, mDir.x));
        float tailLength = u * lerp(1.65, 2.65, mB);
        float tailDist = max(-along, 0.0);
        float tailT = saturate(tailDist / tailLength);
        float coreW = max(0.75, u * 0.022) * 1.38;
        float trailW = max(0.60, coreW * lerp(0.85, 0.24, tailT));
        float trailMask = smoothstep(coreW * 0.5, -coreW * 0.5, along) * (1.0 - smoothstep(0.55, 1.0, tailT));
        float trail = exp(-pow(across / trailW, 2.0)) * exp(-tailT * 2.0) * trailMask;
        float trailHalo = exp(-pow(across / (trailW * 3.0), 2.0)) * exp(-tailT * 3.2) * trailMask;
        float mCore = exp(-dot(mp, mp) / (coreW * coreW));
        float mHalo = exp(-dot(mp, mp) / (coreW * coreW * 15.0));
        float mFade = smoothstep(0.0, 0.12, mt) * (1.0 - smoothstep(0.78, 1.0, mt));
        float3 mTint = lerp(float3(0.58, 0.82, 1.0), float3(1.0, 0.83, 0.59), mD);
        float mVis = mFade * trackEdge * smoothstep(0.23, 0.42, r) * lerp(0.90, 1.0, played);
        float3 meteorPrism = prismColor(mA + tailT * 0.72 + across / max(1.0, coreW) * 0.12);
        float3 meteorHaloColor = lerp(mTint, meteorPrism, 0.68 * OPTICS);
        layer(acc, cover, meteorHaloColor, saturate(trailHalo * 0.76 + mHalo * 0.63) * mVis);
        layer(acc, cover, lerp(mTint, float3(1.0, 1.0, 0.98), saturate(mCore + trail * 0.65)), saturate(mCore * 1.38 + trail * 1.38) * mVis);
    }

    [unroll]
    for (int i = 0; i < 3; i++)
    {
        float fi = (float)i + 1.0;
        float hA = hash1(fi * 23.1);
        float hB = hash1(fi * 53.7);
        float hC = hash1(fi * 83.9);

        float dir = (i == 1) ? -1.0 : 1.0;
        float speed = u * lerp(0.65, 1.15, hA) * dir * 0.70;
        float period = max(w * 0.65, u * 12.0);

        float worldPhase = (px.x - time * speed + hB * period) / period;
        float relX = (frac(worldPhase) - 0.5) * period;

        float waveFreq = (0.8 + 0.4 * hA) * 0.70;
        float waveArg = time * waveFreq + fi * 2.3;
        float cy = u * lerp(0.24, 0.76, hC) + sin(waveArg) * (u * 0.09);

        float slope = cos(waveArg) * 0.11 * dir;
        float2 cd = rot(float2(relX * dir, px.y - cy), slope);

        float cometSz = u * lerp(0.022, 0.036, hA) * 1.38;
        float headGlow = exp(-dot(cd, cd) / (cometSz * cometSz));

        float tailX = max(-cd.x, 0.0);
        float tailW = cometSz * (0.45 + tailX / (u * 0.65));
        float tailCurve = sin(tailX / (u * 0.25)) * cometSz * 0.35;
        float tailGlow = exp(-pow((cd.y - tailCurve) / tailW, 2.0)) * exp(-tailX / (u * 0.28)) * smoothstep(cometSz * 0.5, -cometSz * 0.5, cd.x) * (1.0 - smoothstep(u * 0.80, u * 0.95, tailX));

        float3 cometCol = lerp(float3(0.55, 0.85, 1.0), float3(1.0, 0.80, 0.50), hB);
        float cometAlpha = saturate(headGlow * 1.44 + tailGlow * 0.77) * smoothstep(0.32, 0.58, r) * lerp(0.30, 1.0, played) * trackEdge;
        layer(acc, cover, lerp(cometCol, diskHot, headGlow * 0.75), cometAlpha);
    }

    float rEH = 0.195 * (1.0 + 0.04 * vol + 0.05 * flick);

    float2 shCoord = float2(q.x + 0.28, q.y * 1.40);
    float gravShadow = exp(-dot(shCoord, shCoord) * 1.35) * 0.70 + exp(-r * r * 2.2) * 0.80;
    layer(acc, cover, float3(0.01, 0.015, 0.03), saturate(gravShadow) * edge * shadowFade);

    if (q.x < 0.15)
    {
        float wakeLen = clamp(-q.x, 0.0, 4.2);
        float targetY = -q.x * 0.14 - 0.02 + sin(q.x * 4.2 - time * 3.6) * 0.055 * smoothstep(0.0, 1.2, wakeLen);
        float streamDist = abs(q.y - targetY);
        float streamWidth = 0.036 + wakeLen * 0.028;

        float streamCore = exp(-(streamDist * streamDist) / (streamWidth * streamWidth));
        float streamFade = exp(-wakeLen * 0.62) * smoothstep(0.05, -0.32, q.x);

        float plasmaFlow = 0.68 + 0.32 * sin(q.x * 15.0 - time * 8.5 + streamDist * 12.0);
        float3 wakeCol = lerp(diskOuter, diskMid, streamCore * plasmaFlow);
        wakeCol = lerp(wakeCol, diskHot, pow(streamCore, 2.8) * (0.45 + 0.35 * vol));

        float wakeAlpha = streamCore * streamFade * (0.68 + 0.22 * vol + 0.20 * flick) * played * edge;
        layer(acc, cover, wakeCol, wakeAlpha);
    }

    // Local optical flare around the moving black hole. Render behind the hot disk
    // and the event horizon, so the original silhouette stays readable.
    if (r < 2.4)
    {
        float2 lensQ = rot(q, -0.14);
        float lensR = length(float2(lensQ.x * 0.72, lensQ.y * 1.25));
        float lensAngle = atan2(lensQ.y, lensQ.x);
        float arcGate = pow(saturate(0.5 + 0.5 * cos(lensAngle * 2.0 - time * 0.68)), 4.0);
        float arc1 = exp(-pow((lensR - rEH * 2.04) / 0.025, 2.0));
        float arc2 = exp(-pow((lensR - rEH * 2.19) / 0.030, 2.0));
        float3 arcColor = prismColor(lensAngle * 0.159155 + time * 0.10 + lensR * 1.1);
        float3 arcColor2 = prismColor(lensAngle * 0.159155 + time * 0.10 + lensR * 1.1 + 0.26);
        float optLocal = edge * OPTICS * (0.62 + 0.20 * vol + 0.18 * flick);
        layer(acc, cover, arcColor, arc1 * arcGate * optLocal * 0.58);
        layer(acc, cover, arcColor2, arc2 * arcGate * optLocal * 0.34);

        // Anamorphic streak with separated cyan, violet and amber sidebands.
        float streakX = abs(lensQ.x);
        float streakFade = exp(-streakX * 1.65) * smoothstep(rEH * 0.95, rEH * 1.65, r);
        float spectralY = 0.045 + streakX * 0.038;
        float streakA = exp(-pow((lensQ.y - spectralY) / 0.022, 2.0));
        float streakB = exp(-pow((lensQ.y + spectralY) / 0.026, 2.0));
        float streakPulse = 0.45 + 0.35 * pow(0.5 + 0.5 * sin(time * 1.15), 3.0) + 0.20 * flick;
        float3 streakColA = lerp(float3(0.18, 0.78, 1.0), float3(0.83, 0.32, 1.0), 0.5 + 0.5 * sin(time * 0.31 + streakX));
        float3 streakColB = lerp(float3(1.0, 0.42, 0.65), float3(1.0, 0.80, 0.24), 0.5 + 0.5 * cos(time * 0.27 + streakX));
        layer(acc, cover, streakColA, streakA * streakFade * streakPulse * optLocal * 0.76);
        layer(acc, cover, streakColB, streakB * streakFade * streakPulse * optLocal * 0.64);

        // Two faint optical ghost highlights on the moving flare axis.
        float ghostSign = 1.0;
        float2 ghostQ1 = lensQ - float2(ghostSign * 0.76, 0.115);
        float2 ghostQ2 = lensQ - float2(ghostSign * 1.23, 0.19);
        float ghostR1 = length(float2(ghostQ1.x, ghostQ1.y * 1.18));
        float ghostR2 = length(float2(ghostQ2.x, ghostQ2.y * 1.18));
        float ghost1 = exp(-pow((ghostR1 - 0.074) / 0.020, 2.0));
        float ghost2 = exp(-pow((ghostR2 - 0.046) / 0.014, 2.0));
        float ghostPulse = 0.30 + 0.70 * pow(0.5 + 0.5 * sin(time * 0.82), 3.0);
        layer(acc, cover, prismColor(time * 0.08 + ghostR1 * 2.4), ghost1 * optLocal * ghostPulse * 0.35);
        layer(acc, cover, prismColor(time * 0.08 + 0.42), ghost2 * optLocal * ghostPulse * 0.24);
    }

    float pulseR = (1.0 - flick) * 1.10 + rEH * 1.15;
    float ringWave = exp(-pow((r - pulseR) / 0.038, 2.0)) * flick;
    layer(acc, cover, lerp(diskMid, diskHot, 0.65), ringWave * 0.65 * edge);

    float archR = length(float2(q.x * 0.90, q.y * 1.16));
    float archBand = exp(-pow((archR - rEH * 1.24) / (0.078 + 0.020 * vol), 2.0));

    float2 qRotBack = rot(q, -time * 1.5);
    float angBack = atan2(qRotBack.y, qRotBack.x);
    float spiralBack = 0.72 + 0.28 * sin(angBack * 7.0 + archR * 22.0 - time * 3.0);

    float doppler = smoothstep(0.55, -0.45, q.x);
    float3 archCol = lerp(diskOuter, diskMid, saturate(archBand * 1.15 * spiralBack + doppler * 0.35));
    archCol = lerp(archCol, diskHot, pow(archBand, 2.4) * (0.50 + 0.35 * doppler + 0.25 * flick));

    float archAlpha = archBand * (0.82 + 0.18 * spiralBack) * (0.88 + 0.22 * vol) * edge;
    layer(acc, cover, archCol, archAlpha);

    float ehMask = smoothstep(rEH + 0.012, rEH - 0.012, r);
    float3 voidCol = float3(0.018, 0.026, 0.052) * (1.0 - 0.5 * smoothstep(rEH, 0.0, r));
    layer(acc, cover, voidCol, ehMask * 0.90 * edge);

    float photon1 = exp(-pow((r - rEH * 1.015) / 0.014, 2.0));
    float photon2 = exp(-pow((r - rEH * 1.085) / 0.022, 2.0)) * 0.45;
    float photonTotal = saturate(photon1 + photon2);
    float3 photonCol = lerp(diskMid, diskHot, 0.82 + 0.18 * doppler);
    layer(acc, cover, photonCol * (1.25 + 0.35 * flick), photonTotal * (0.95 + 0.20 * vol) * edge);

    float2 dq = rot(q, -0.14);
    dq.y += 0.020;
    float2 diskEll = float2(dq.x * 0.35, dq.y * 2.85);
    float rDisk = length(diskEll);

    float frontMask = smoothstep(0.065, -0.025, dq.y);
    float outsideSphere = smoothstep(rEH * 0.90, rEH * 1.06, r);
    float frontOcclusion = max(frontMask, outsideSphere);

    float diskAng = atan2(diskEll.y, diskEll.x);
    float spiralWave1 = sin(diskAng * 5.0 - log(max(rDisk, 0.04)) * 9.0 - time * 4.2);
    float spiralWave2 = cos(diskAng * 8.0 - rDisk * 26.0 - time * 5.5);
    float diskTex = 0.72 + 0.18 * spiralWave1 + 0.10 * spiralWave2;

    float diskProfile = smoothstep(0.065, 0.13, rDisk) * exp(-pow(max(rDisk - 0.135, 0.0) / (0.20 + 0.045 * vol), 1.60));
    float innerHotRim = exp(-pow((rDisk - 0.115) / 0.038, 2.0));

    float3 frontCol = lerp(diskOuter, diskMid, saturate(diskProfile * diskTex * 1.15 + doppler * 0.32));
    frontCol = lerp(frontCol, diskHot, saturate(innerHotRim * 0.90 + pow(diskProfile, 2.0) * doppler * 0.55 + flick * 0.25));

    float frontAlpha = saturate(diskProfile * (0.88 + 0.25 * diskTex) + innerHotRim * 0.55) * frontOcclusion * edge;
    layer(acc, cover, frontCol, frontAlpha);

    return paint(acc / max(cover, 0.001), saturate(cover));
}