{
  "license": "CC0-1.0",
  "shader": {
    "id": "8exkb82g",
    "title": "Aurora Fold",
    "license": "CC0-1.0",
    "provenance_type": "user_upload",
    "made_with": "glslop",
    "status": "active",
    "compile_ok": true,
    "tags": [
      "aurora",
      "kaleidoscope",
      "plasma",
      "abstract",
      "generator"
    ],
    "parents": [],
    "author": "zazi5inxhmgi",
    "author_name": "ufffd",
    "author_url": "/u/ufffd",
    "created_at": "2026-06-16T07:22:33.080Z",
    "poster_url": "/posters/8exkb82g.avif",
    "stats": {
      "slops": 0,
      "views": 146,
      "forks": 0
    },
    "self": "/api/v1/shaders/8exkb82g",
    "isf": "/*{\n  \"DESCRIPTION\": \"Aurora Fold — a folded, flowing field of light. Domain-warped sinusoids run through a kaleidoscopic fold and a soft aurora palette. CC0.\",\n  \"CREDIT\": \"made with the glslop skill\",\n  \"CATEGORIES\": [\"generator\", \"abstract\"],\n  \"INPUTS\": [\n    { \"NAME\": \"speed\",  \"TYPE\": \"float\", \"DEFAULT\": 0.6, \"MIN\": 0.0, \"MAX\": 2.0 },\n    { \"NAME\": \"warp\",   \"TYPE\": \"float\", \"DEFAULT\": 1.3, \"MIN\": 0.0, \"MAX\": 3.0 },\n    { \"NAME\": \"folds\",  \"TYPE\": \"float\", \"DEFAULT\": 5.0, \"MIN\": 1.0, \"MAX\": 10.0 },\n    { \"NAME\": \"glow\",   \"TYPE\": \"float\", \"DEFAULT\": 0.55, \"MIN\": 0.0, \"MAX\": 1.0 },\n    { \"NAME\": \"tintA\",  \"TYPE\": \"color\", \"DEFAULT\": [0.10, 0.85, 0.70, 1.0] },\n    { \"NAME\": \"tintB\",  \"TYPE\": \"color\", \"DEFAULT\": [0.55, 0.15, 0.95, 1.0] }\n  ]\n}*/\n\n// Aurora Fold — single-pass ISF / GLSL ES 1.00.\n// No #version, writes gl_FragColor, constant loop bounds, no round/tanh/dFdx.\n\nconst float PI = 3.14159265359;\n\n// 2x2 rotation\nmat2 rot(float a){\n  float c = cos(a), s = sin(a);\n  return mat2(c, -s, s, c);\n}\n\nvoid main(){\n  // aspect-correct, centered coords (-1..1 on the short axis)\n  vec2 res = RENDERSIZE;\n  vec2 uv = (gl_FragCoord.xy - 0.5 * res) / min(res.x, res.y);\n\n  float t = TIME * speed;\n\n  // kaleidoscopic fold: wrap the angle into 'folds' wedges and mirror it\n  float r = length(uv);\n  float a = atan(uv.y, uv.x);\n  float seg = (2.0 * PI) / max(folds, 1.0);\n  a = mod(a, seg);\n  a = abs(a - 0.5 * seg);          // mirror within the wedge\n  vec2 p = vec2(cos(a), sin(a)) * r;\n\n  // domain warp: a few octaves of swirling sinusoids feeding back on themselves\n  vec2 q = p * 3.0;\n  float acc = 0.0;\n  for (int i = 0; i < 5; i++){\n    q = rot(0.5 + 0.21 * float(i) + 0.15 * t) * q;\n    q += warp * vec2(\n      sin(q.y * 1.7 + t * 1.3),\n      cos(q.x * 1.7 - t * 1.1)\n    );\n    acc += sin(q.x + q.y + t) / float(i + 2);\n  }\n\n  // shape the field into glowing filaments\n  float field = 0.5 + 0.5 * sin(acc * PI + t);\n  float core  = smoothstep(0.05, 0.95, field);\n  float fil   = pow(core, mix(0.7, 3.0, glow));         // ribbons, but keep them lit\n  float halo  = 0.9 * pow(core, 1.2) / (0.25 + r);      // radial bloom toward center\n\n  // aurora palette: blend the two tints by the field, lift with the bloom\n  vec3 base = mix(tintA.rgb, tintB.rgb, field);\n  vec3 col  = base * (0.25 + 1.3 * fil);                // ambient floor + lit ribbons\n  col += halo * mix(tintA.rgb, tintB.rgb, 0.5);\n  col += 0.15 * base;                                   // keep some color in the shadows\n\n  // subtle vignette so the edges fall to black\n  col *= smoothstep(1.2, 0.15, r);\n\n  // filmic-ish tone map, then a touch of gamma + saturation\n  col = col / (col + vec3(0.7));\n  col = pow(col, vec3(0.78));\n  float lum = dot(col, vec3(0.299, 0.587, 0.114));\n  col = mix(vec3(lum), col, 1.25);                      // boost saturation\n\n  gl_FragColor = vec4(col, 1.0);\n}\n"
  }
}