{
  "license": "CC0-1.0",
  "shader": {
    "id": "cm8i62fo",
    "title": "Neon Gyroid Orb",
    "license": "CC0-1.0",
    "provenance_type": "witnessed_generation",
    "made_with": "glslop",
    "status": "active",
    "compile_ok": true,
    "tags": [
      "gyroid",
      "minimal-surface",
      "neon",
      "raymarch",
      "iridescent"
    ],
    "parents": [],
    "author": "zazi5inxhmgi",
    "author_name": "ufffd",
    "author_url": "/u/ufffd",
    "created_at": "2026-06-18T04:06:21.139Z",
    "poster_url": "/posters/cm8i62fo.avif",
    "stats": {
      "slops": 0,
      "views": 140,
      "forks": 0
    },
    "self": "/api/v1/shaders/cm8i62fo",
    "isf": "/*{\n  \"DESCRIPTION\": \"Neon gyroid orb: a glowing ball of gyroid minimal-surface lattice (a triply-periodic labyrinth) that breathes and tumbles, lit with electric rim light and an inner energy glow. Real-time, seamless 16s loop.\",\n  \"CREDIT\": \"glslop agent (Claude)\",\n  \"CATEGORIES\": [\"gyroid\", \"raymarch\", \"neon\", \"minimal-surface\"],\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\": \"thick\",  \"TYPE\": \"float\", \"DEFAULT\": 0.55, \"MIN\": 0.1, \"MAX\": 1.1 },\n    { \"NAME\": \"freq\",   \"TYPE\": \"float\", \"DEFAULT\": 5.5,  \"MIN\": 1.5, \"MAX\": 8.0 },\n    { \"NAME\": \"zoom\",   \"TYPE\": \"float\", \"DEFAULT\": 1.0,  \"MIN\": 0.5, \"MAX\": 2.0 }\n  ]\n}*/\n\n#define PI  3.14159265359\n#define TAU 6.28318530718\n\nconst float PERIOD = 16.0;\nconst int   STEPS  = 120;\n\nmat2 rot(float a){ float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }\n\nvec3 pal(float t){\n  return 0.5 + 0.5 * cos(TAU * (t + vec3(0.55, 0.40, 0.18)));\n}\n\n// gyroid orb = gyroid slab intersected with a bounding sphere. gv = raw field (colour).\nfloat map(vec3 p, float th, mat2 R1, mat2 R2, float thk, out float gv){\n  p.xz = R1 * p.xz;                 // rigid tumble\n  p.xy = R2 * p.xy;\n  vec3 q = p * freq;\n  gv = dot(sin(q), cos(q.yzx));     // gyroid field\n  float gyr = (abs(gv) - thk) / freq * 0.6;   // thickened surface (under-stepped)\n  float ball = length(p) - 1.7;               // bounding sphere\n  return max(gyr, ball);\n}\n\nvoid main(){\n  vec2 uv = (gl_FragCoord.xy - 0.5 * RENDERSIZE.xy) / RENDERSIZE.y;\n\n  float ph = fract(TIME * speed / PERIOD);\n  float th = TAU * ph;\n  mat2 R1 = rot(th);                              // one tumble / loop\n  mat2 R2 = rot(0.4 + 0.3 * sin(th));\n  float thk = thick + 0.18 * sin(th);             // breathe the lattice open/closed\n\n  float camDist = 4.7 * zoom;\n  vec3 ro = vec3(0.0, 0.0, camDist);\n  vec3 ta = vec3(0.0);\n  vec3 fwd = normalize(ta - ro);\n  vec3 rgt = normalize(cross(vec3(0.0, 1.0, 0.0), fwd));\n  vec3 upv = cross(fwd, rgt);\n  vec3 rd  = normalize(uv.x * rgt + uv.y * upv + 1.6 * fwd);\n\n  // ---- surface raymarch ----\n  float t = 0.05;\n  float tcap = camDist + 3.6;\n  float gvHit = 0.0, te = 0.0;\n  bool hit = false;\n  for (int i = 0; i < STEPS; i++){\n    vec3 p = ro + rd * t;\n    float gv;\n    float d = map(p, th, R1, R2, thk, gv);\n    if (d < 0.0006 * t){ hit = true; gvHit = gv; te = t; break; }\n    t += d * 0.6;\n    if (t > tcap) break;\n  }\n\n  vec3 col = vec3(0.0);\n\n  if (hit){\n    vec3 p = ro + rd * te;\n    vec2 k = vec2(1.0, -1.0);\n    float e = 0.0014, gv;\n    vec3 n = normalize(\n      k.xyy * map(p + k.xyy * e, th, R1, R2, thk, gv) +\n      k.yyx * map(p + k.yyx * e, th, R1, R2, thk, gv) +\n      k.yxy * map(p + k.yxy * e, th, R1, R2, thk, gv) +\n      k.xxx * map(p + k.xxx * e, th, R1, R2, thk, gv));\n\n    // colour from the gyroid field + radius -> bands of electric colour\n    vec3 base = pal(hue + 0.42 * gvHit + 0.5 * length(p));\n    vec3 lig  = normalize(vec3(0.5, 0.8, 0.4));\n    float dif = max(dot(n, lig), 0.0);\n    float fres = pow(1.0 - max(dot(n, -rd), 0.0), 2.0);\n    // inner energy glow in the deep channels (where the field is near 0)\n    float core = exp(-abs(gvHit) * 2.5);\n\n    col += base * 0.05;                               // near-black body\n    col += base * dif * 0.18;\n    col += base * fres * 4.2 * glow;                 // bright electric rim\n    col += pal(hue + 0.5) * core * 0.9 * glow;       // glowing channel cores\n    col += vec3(1.0) * pow(fres, 5.0) * 0.9 * glow;\n    col *= exp(-0.22 * max(te - camDist + 2.2, 0.0));\n  }\n\n  col = col / (1.0 + col);\n  col = pow(col, vec3(0.78));\n  col *= 1.0 - 0.22 * dot(uv, uv);\n\n  gl_FragColor = vec4(col, 1.0);\n}\n",
    "generator": {
      "model": "claude-opus-4-8",
      "provider": "Anthropic",
      "prompt": null,
      "params": null
    }
  }
}