{
  "name": "Soft Volumetric Cloud Layer",
  "dimension": "3d",
  "slot": "action_bar",
  "width": 256,
  "height": 128,
  "textBaseline": 128,
  "placement": {
    "x": 0,
    "y": 0
  },
  "shapes": [],
  "texts": [],
  "heads": [],
  "images": [],
  "bars": [],
  "triggers": [],
  "world": {
    "glsl": "const int STATE_DRIFTING = 0;\n\nvec4 cloudHash(vec4 p) {\n    p = fract(p * 0.1031);\n    p *= p + 33.33;\n    return fract(p * (p + p));\n}\nfloat cloudNoise(vec3 p) {\n    vec3 i = floor(p);\n    vec3 f = fract(p);\n    f = f * f * (3.0 - 2.0 * f);\n    float n = dot(i, vec3(1.0, 57.0, 113.0));\n    vec4 a = cloudHash(n + vec4(0.0, 1.0, 57.0, 58.0));\n    vec4 b = cloudHash(n + vec4(113.0, 114.0, 170.0, 171.0));\n    vec4 v = mix(a, b, f.z);\n    return mix(mix(v.x, v.y, f.x), mix(v.z, v.w, f.x), f.y);\n}\nfloat cloudCoverage(vec2 p) {\n    vec2 i = floor(p);\n    vec2 f = fract(p);\n    f = f * f * (3.0 - 2.0 * f);\n    vec4 h = cloudHash(dot(i, vec2(1.0, 57.0)) + vec4(0.0, 1.0, 57.0, 58.0));\n    return mix(mix(h.x, h.y, f.x), mix(h.z, h.w, f.x), f.y);\n}\nfloat cloudLayer(vec3 p, vec3 drift) {\n    float cover = cloudCoverage((p.xz + drift.xz) * vec2(3.2, 3.8) + vec2(9.2, 4.8));\n    float center = -0.09 + (cover - 0.5) * 0.045;\n    float y = (p.y - center) / 0.19;\n    float edge = smoothstep(0.63, 0.94, length(p.xz)) * 0.48;\n    float base = smoothstep(-0.37, -0.26, p.y);\n    return cover * 0.70 - 0.225 - y * y * 0.18 - edge - (1.0 - base) * 0.3;\n}\nfloat cloudDensity(vec3 p, vec3 drift) {\n    float layer = cloudLayer(p, drift);\n    if (layer < -0.25) return 0.0;\n    vec3 q = p + drift;\n    q.y += drift.y * 0.5;\n    float vapor = cloudNoise(q * vec3(9.5, 10.5, 9.5) + vec3(1.7, 8.3, 4.2));\n    float field = layer + (vapor - 0.5) * 0.43;\n    float feather = 1.0 - smoothstep(0.89, 0.955, length(p));\n    return smoothstep(-0.06, 0.19, field) * feather;\n}\nvec4 object(vec3 ro, vec3 rd, float t0, float t1, float time, vec3 light, inout float depth) {\n    float ta = t0;\n    float tb = t1;\n    if (abs(rd.y) > 0.0001) {\n        float a = (-0.38 - ro.y) / rd.y;\n        float b = (0.33 - ro.y) / rd.y;\n        ta = max(ta, min(a, b));\n        tb = min(tb, max(a, b));\n    }\n    if (tb <= ta) return vec4(0.0);\n    // Object-space advection: no screen-space noise or frame-dependent jitter.\n    // The closed wind path also joins smoothly across the 1200-second clock wrap.\n    float phase = time * 0.00523598776;\n    vec3 drift = vec3(3.4 * sin(phase), 0.85 * sin(phase * 2.0), 2.6 * (sin(phase + 0.6) - sin(0.6)));\n    drift += vec3(rpw_seed * 0.73, rpw_seed * 0.17, rpw_seed * 0.41);\n    vec3 sun = normalize(vec3(-0.45, 0.82, 0.35));\n    float dt = (tb - ta) / 34.0;\n    vec3 accum = vec3(0.0);\n    float alpha = 0.0;\n    float first = -1.0;\n    float weightedDepth = 0.0;\n    float forward = pow(max(dot(rd, sun), 0.0), 6.0);\n    vec3 illumination = clamp(light, 0.0, 1.0);\n    for (int i = 0; i < 34; i++) {\n        float t = ta + (float(i) + 0.5) * dt;\n        vec3 p = ro + rd * t;\n        float d = cloudDensity(p, drift);\n        if (d > 0.002) {\n            float shadow = cloudDensity(p + sun * 0.095, drift);\n            float sunlight = exp(-shadow * 2.6);\n            float high = smoothstep(-0.28, 0.27, p.y);\n            vec3 ambient = mix(vec3(0.39, 0.46, 0.57), vec3(0.57, 0.64, 0.75), high);\n            vec3 c = ambient + vec3(1.0, 0.965, 0.90) * sunlight * (0.44 + forward * 0.22);\n            c += vec3(0.04, 0.045, 0.05) * (1.0 - d);\n            c *= illumination;\n            float a = 1.0 - exp(-d * dt * 21.0);\n            float weight = (1.0 - alpha) * a;\n            accum += c * weight;\n            weightedDepth += t * weight;\n            alpha += weight;\n            if (first < 0.0 && alpha > 0.3) first = t;\n            if (alpha > 0.992) break;\n        }\n    }\n    if (alpha < 0.003) return vec4(0.0);\n    depth = clamp(first >= 0.0 ? first : weightedDepth / alpha, t0, t1);\n    return vec4(accum / max(alpha, 0.0001), alpha);\n}",
    "prompt": "Photorealistic volumetric cloud layer inspired by the reference image: thick soft white and pale gray mist filling the lower world, wispy translucent edges, layered vapor banks with natural sunlight scattering, gentle blue atmospheric shadows, realistic depth and rolling movement, leaving distant terrain partially visible through gaps. Designed as a shader-drawn 3D world object for Minecraft Bedrock 26.50, with an airy cinematic mood and no solid geometric shapes.",
    "size": 64
  }
}