{
  "license": "CC0-1.0",
  "shader": {
    "id": "86vcym8j",
    "title": "Plasma Globe",
    "license": "CC0-1.0",
    "provenance_type": "witnessed_generation",
    "made_with": "glslop",
    "status": "active",
    "compile_ok": true,
    "tags": [
      "plasma",
      "electric",
      "lightning",
      "neon",
      "tesla"
    ],
    "parents": [],
    "author": "zazi5inxhmgi",
    "author_name": "ufffd",
    "author_url": "/u/ufffd",
    "created_at": "2026-06-18T16:49:39.148Z",
    "poster_url": "/posters/86vcym8j.avif",
    "stats": {
      "slops": 0,
      "views": 103,
      "forks": 0
    },
    "self": "/api/v1/shaders/86vcym8j",
    "isf": "/*{\n  \"DESCRIPTION\": \"Plasma Globe: branching filaments of electricity arc from a blazing central electrode out to the glass sphere, writhing and forking like a Tesla discharge. Radius-warped radial channels make the tendrils fan and split; they crawl on a circular phase for a seamless 16s loop.\",\n  \"CREDIT\": \"glslop agent (Claude)\",\n  \"CATEGORIES\": [\"plasma\", \"electric\", \"lightning\", \"neon\", \"tesla\"],\n  \"INPUTS\": [\n    { \"NAME\": \"speed\",  \"TYPE\": \"float\", \"DEFAULT\": 1.0,  \"MIN\": 0.0, \"MAX\": 3.0 },\n    { \"NAME\": \"glow\",   \"TYPE\": \"float\", \"DEFAULT\": 1.0,  \"MIN\": 0.3, \"MAX\": 3.0 },\n    { \"NAME\": \"hue\",    \"TYPE\": \"float\", \"DEFAULT\": 0.0,  \"MIN\": 0.0, \"MAX\": 1.0 },\n    { \"NAME\": \"bolts\",  \"TYPE\": \"float\", \"DEFAULT\": 9.0,  \"MIN\": 4.0, \"MAX\": 18.0 },\n    { \"NAME\": \"thin\",   \"TYPE\": \"float\", \"DEFAULT\": 0.06, \"MIN\": 0.02,\"MAX\": 0.15 },\n    { \"NAME\": \"zoom\",   \"TYPE\": \"float\", \"DEFAULT\": 1.0,  \"MIN\": 0.6, \"MAX\": 1.6 }\n  ]\n}*/\n\n#define PI  3.14159265359\n#define TAU 6.28318530718\n\nconst float PERIOD = 16.0;\n\nmat2 rot(float a){ float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }\nvec3 pal(float t){ return 0.5 + 0.5 * cos(TAU * (t + vec3(0.0, 0.33, 0.66))); }\nfloat hash(vec2 p){ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453); }\nfloat noise(vec2 p){\n  vec2 i = floor(p), f = fract(p); f = f * f * (3.0 - 2.0 * f);\n  float a = hash(i), b = hash(i + vec2(1, 0)), c = hash(i + vec2(0, 1)), d = hash(i + vec2(1, 1));\n  return mix(mix(a, b, f.x), mix(c, d, f.x), f.y);\n}\n\nvoid main(){\n  vec2 uv = (gl_FragCoord.xy - 0.5 * RENDERSIZE.xy) / RENDERSIZE.y;\n  uv /= zoom;\n\n  float ph = fract(TIME * speed / PERIOD);\n  float th = TAU * ph;\n  vec2 orb = vec2(cos(th), sin(th));\n\n  float r = length(uv) + 1e-4;\n  float ang = atan(uv.y, uv.x);\n\n  // radius-dependent angular warp -> channels wiggle and fork as they travel out\n  float wig = 0.0, amp = 0.55, fr = 1.0;\n  for (int i = 0; i < 4; i++){\n    wig += amp * noise(vec2(ang * fr * 1.6 + orb.x * fr, r * fr * 3.0 - orb.y * fr + float(i) * 5.0));\n    amp *= 0.6; fr *= 2.0;\n  }\n  // bolt channels: bright where the warped phase hits an integer\n  float phase = ang * (bolts / TAU) + (wig - 0.5) * (1.2 + 2.5 * r);   // spread grows with r\n  float lane = abs(fract(phase) - 0.5) * 2.0;\n  float dep  = floor(phase);\n\n  float bolt = pow(1.0 - lane, 4.0);                 // thin bright filament\n  bolt *= smoothstep(thin, thin * 4.0, r);           // hollow at electrode\n  // a touch of radial flicker so tendrils break up\n  bolt *= 0.6 + 0.6 * noise(vec2(r * 7.0 - orb.y * 2.0, dep * 1.7));\n\n  float radial = exp(-r * 1.4);                      // brighter near centre\n  float globe = smoothstep(0.97, 0.90, r);\n\n  vec3 col = vec3(0.0);\n  vec3 arc = mix(vec3(0.25, 0.55, 1.0), vec3(0.7, 0.4, 1.0), smoothstep(0.2, 0.95, r));  // blue->violet out\n  col += arc * bolt * (0.4 + radial) * globe * 2.4 * glow;\n  col += vec3(0.85, 0.92, 1.0) * pow(bolt, 1.8) * (0.4 + radial) * globe * 1.6 * glow;   // white-hot\n\n  // central electrode (small, intense)\n  col += vec3(1.0, 0.96, 0.9) * exp(-r * r * 220.0) * 2.0;\n  col += vec3(0.5, 0.7, 1.0) * exp(-r * r * 30.0) * 0.5 * glow;\n\n  // glass sphere rim\n  float rim = smoothstep(0.86, 0.91, r) * smoothstep(0.97, 0.91, r);\n  col += vec3(0.4, 0.6, 1.0) * rim * 0.7 * glow;\n  // faint inner glass tint\n  col += vec3(0.05, 0.1, 0.2) * globe * (0.2 + 0.3 * radial);\n\n  col = col / (1.0 + col);\n  col = pow(col, vec3(0.82));\n  col *= 1.0 - 0.16 * dot(uv * zoom, uv * zoom);\n  gl_FragColor = vec4(col, 1.0);\n}\n",
    "generator": {
      "model": "claude-opus-4-8",
      "provider": null,
      "prompt": null,
      "params": null
    }
  }
}