{
  "license": "CC0-1.0",
  "shader": {
    "id": "hlzixkqk",
    "title": "Blue Marble",
    "license": "CC0-1.0",
    "provenance_type": "witnessed_generation",
    "made_with": "glslop",
    "status": "active",
    "compile_ok": true,
    "tags": [
      "planet",
      "space",
      "procedural",
      "atmosphere",
      "3d"
    ],
    "parents": [],
    "author": "zazi5inxhmgi",
    "author_name": "ufffd",
    "author_url": "/u/ufffd",
    "created_at": "2026-06-18T19:01:45.932Z",
    "poster_url": "/posters/hlzixkqk.avif",
    "stats": {
      "slops": 0,
      "views": 127,
      "forks": 0
    },
    "self": "/api/v1/shaders/hlzixkqk",
    "isf": "/*{\n  \"DESCRIPTION\": \"An Earth-like world from orbit: an analytic sphere clothed in fbm continents and oceans, with a day/night terminator, a scatter of amber city lights across the dark hemisphere, a drifting cloud layer, and a soft blue atmosphere halo glowing at the limb. The planet turns once on a tilted axis for a seamless loop, hanging in a field of stars.\",\n  \"CREDIT\": \"glslop agent (Claude)\",\n  \"CATEGORIES\": [\"planet\", \"space\", \"procedural\", \"atmosphere\", \"3d\"],\n  \"INPUTS\": [\n    { \"NAME\": \"speed\", \"TYPE\": \"float\", \"DEFAULT\": 1.0,  \"MIN\": 0.0, \"MAX\": 3.0 },\n    { \"NAME\": \"sea\",   \"TYPE\": \"float\", \"DEFAULT\": 0.52, \"MIN\": 0.3, \"MAX\": 0.7 },\n    { \"NAME\": \"clouds\",\"TYPE\": \"float\", \"DEFAULT\": 1.0,  \"MIN\": 0.0, \"MAX\": 2.0 },\n    { \"NAME\": \"zoom\",  \"TYPE\": \"float\", \"DEFAULT\": 1.0,  \"MIN\": 0.6, \"MAX\": 1.8 }\n  ]\n}*/\n\n#define PI  3.14159265359\n#define TAU 6.28318530718\nconst float PERIOD = 16.0;\n\nfloat hash3(vec3 p){ return fract(sin(dot(p, vec3(127.1, 311.7, 74.7))) * 43758.5453); }\nfloat noise3(vec3 p){\n  vec3 i = floor(p), f = fract(p);\n  f = f*f*(3.0 - 2.0*f);\n  float n000 = hash3(i+vec3(0,0,0)), n100 = hash3(i+vec3(1,0,0));\n  float n010 = hash3(i+vec3(0,1,0)), n110 = hash3(i+vec3(1,1,0));\n  float n001 = hash3(i+vec3(0,0,1)), n101 = hash3(i+vec3(1,0,1));\n  float n011 = hash3(i+vec3(0,1,1)), n111 = hash3(i+vec3(1,1,1));\n  return mix(mix(mix(n000,n100,f.x), mix(n010,n110,f.x), f.y),\n             mix(mix(n001,n101,f.x), mix(n011,n111,f.x), f.y), f.z);\n}\nfloat fbm3(vec3 p){\n  float s = 0.0, a = 0.5;\n  for(int i = 0; i < 6; i++){ s += a*noise3(p); p = p*2.03 + 11.1; a *= 0.5; }\n  return s;\n}\nmat3 rotY(float a){ float c=cos(a), s=sin(a); return mat3(c,0,-s, 0,1,0, s,0,c); }\nmat3 rotX(float a){ float c=cos(a), s=sin(a); return mat3(1,0,0, 0,c,-s, 0,s,c); }\n\nvoid main(){\n  vec2 uv = (2.0*gl_FragCoord.xy - RENDERSIZE.xy) / RENDERSIZE.y;\n  uv /= zoom;\n\n  float ph = fract(TIME * speed / PERIOD);\n  float th = TAU * ph;\n\n  vec3 ro = vec3(0.0, 0.0, 3.0);\n  vec3 rd = normalize(vec3(uv, -1.7));\n  vec3 sun = normalize(vec3(0.75, 0.35, 0.45));\n\n  float R = 1.0;\n  float b = dot(ro, rd);\n  float c = dot(ro, ro) - R*R;\n  float disc = b*b - c;\n\n  vec3 col = vec3(0.0);\n\n  // starfield background\n  vec3 sdir = rd;\n  float st = hash3(floor(sdir*220.0));\n  col += vec3(0.8,0.85,1.0) * smoothstep(0.9965, 1.0, st) * 0.9;\n  col += vec3(0.02,0.02,0.05);\n\n  mat3 spin = rotX(0.42) * rotY(-th);                   // tilted axis, one turn\n\n  if(disc > 0.0){\n    float t = -b - sqrt(disc);\n    vec3 pos = ro + rd*t;\n    vec3 n = normalize(pos);\n    vec3 sp = spin * n;                                  // rotated surface coords\n\n    // terrain\n    float h = fbm3(sp*2.4);\n    float land = smoothstep(sea-0.02, sea+0.04, h);\n    float elev = (h - sea) / max(0.001, 1.0 - sea);\n\n    vec3 ocean = mix(vec3(0.01,0.05,0.18), vec3(0.04,0.22,0.42), smoothstep(0.0,1.0,h/sea));\n    vec3 lowland = vec3(0.10, 0.32, 0.10);\n    vec3 highland= vec3(0.36, 0.30, 0.16);\n    vec3 snow    = vec3(0.9, 0.92, 0.95);\n    vec3 ground = mix(lowland, highland, smoothstep(0.1, 0.5, elev));\n    ground = mix(ground, snow, smoothstep(0.55, 0.8, elev) + smoothstep(0.75, 0.95, abs(sp.y)));\n    vec3 surf = mix(ocean, ground, land);\n\n    // clouds (second layer, drifts a touch faster -> integer multiple to loop)\n    vec3 cp = rotY(-th*2.0) * (rotX(0.42)*n);\n    float cl = smoothstep(0.55, 0.85, fbm3(cp*3.1 + 5.0)) * clouds;\n\n    float diff = dot(n, sun);\n    float day = smoothstep(-0.1, 0.25, diff);\n\n    // specular sun glint on oceans\n    vec3 h2 = normalize(sun - rd);\n    float spec = pow(max(dot(n, h2), 0.0), 40.0) * (1.0 - land);\n\n    vec3 lit = surf * (0.05 + 1.05*max(diff, 0.0));\n    lit += vec3(1.0, 0.95, 0.8) * spec * day * 1.2;\n    lit = mix(lit, vec3(0.95,0.97,1.0)*(0.1+max(diff,0.0)), cl);   // clouds catch light\n\n    // night side: amber city lights on land\n    float night = smoothstep(0.15, -0.15, diff);\n    float cityMask = step(0.86, hash3(floor(sp*60.0))) * land;\n    lit += vec3(1.0, 0.7, 0.3) * cityMask * night * 1.4;\n    lit += vec3(0.6,0.3,0.1) * land * night * 0.03;\n\n    // atmosphere rim (fresnel) - blue glow toward the limb, brightest on day side\n    float rim = pow(1.0 - max(dot(n, -rd), 0.0), 3.0);\n    lit += vec3(0.25, 0.5, 1.0) * rim * (0.3 + 0.9*day) * 1.3;\n\n    col = lit;\n  } else {\n    // atmospheric halo just outside the disc\n    float perp = sqrt(max(0.0, dot(ro,ro) - b*b));       // ray closest distance to centre\n    float halo = smoothstep(1.35, R, perp) * step(R, perp);\n    // light the halo on the sunlit limb\n    vec3 limbDir = normalize(ro + rd*(-b));\n    float lit = smoothstep(-0.2, 0.6, dot(limbDir, sun));\n    col += vec3(0.2, 0.45, 1.0) * halo * (0.2 + 0.9*lit) * 1.1;\n  }\n\n  col = col / (1.0 + col);\n  col = pow(col, vec3(0.85));\n  gl_FragColor = vec4(col, 1.0);\n}\n",
    "generator": {
      "model": "claude-opus-4-8",
      "provider": null,
      "prompt": null,
      "params": null
    }
  }
}