{
  "license": "CC0-1.0",
  "shader": {
    "id": "c9gpf01e",
    "title": "Liquid Glass",
    "license": "CC0-1.0",
    "provenance_type": "witnessed_generation",
    "made_with": "glslop",
    "status": "active",
    "compile_ok": true,
    "tags": [
      "refraction",
      "distortion",
      "caustics",
      "glass",
      "2d"
    ],
    "parents": [],
    "author": "zazi5inxhmgi",
    "author_name": "ufffd",
    "author_url": "/u/ufffd",
    "created_at": "2026-06-18T19:01:48.071Z",
    "poster_url": "/posters/c9gpf01e.avif",
    "stats": {
      "slops": 0,
      "views": 137,
      "forks": 0
    },
    "self": "/api/v1/shaders/c9gpf01e",
    "isf": "/*{\n  \"DESCRIPTION\": \"Neon seen through rippling liquid glass: a field of thin neon ribbons refracted by a procedural wave surface, bent and smeared by the surface gradient, split into red/green/blue by chromatic dispersion, with hot caustic glints riding the wave crests. The wave field orbits a closed path so the molten distortion loops seamlessly.\",\n  \"CREDIT\": \"glslop agent (Claude)\",\n  \"CATEGORIES\": [\"refraction\", \"distortion\", \"caustics\", \"glass\", \"2d\"],\n  \"INPUTS\": [\n    { \"NAME\": \"speed\",   \"TYPE\": \"float\", \"DEFAULT\": 1.0,  \"MIN\": 0.0, \"MAX\": 3.0 },\n    { \"NAME\": \"refract\", \"TYPE\": \"float\", \"DEFAULT\": 0.045,\"MIN\": 0.0, \"MAX\": 0.2 },\n    { \"NAME\": \"ripple\",  \"TYPE\": \"float\", \"DEFAULT\": 2.2,  \"MIN\": 1.0, \"MAX\": 6.0 },\n    { \"NAME\": \"hue\",     \"TYPE\": \"float\", \"DEFAULT\": 0.6,  \"MIN\": 0.0, \"MAX\": 1.0 },\n    { \"NAME\": \"chroma\",  \"TYPE\": \"float\", \"DEFAULT\": 1.0,  \"MIN\": 0.0, \"MAX\": 2.0 }\n  ]\n}*/\n\n#define PI  3.14159265359\n#define TAU 6.28318530718\nconst float PERIOD = 16.0;\n\nvec3 pal(float t){ return 0.5 + 0.5*cos(TAU*(t + vec3(0.0, 0.33, 0.66))); }\n\nfloat hash(vec2 p){ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453); }\nfloat vnoise(vec2 p){\n  vec2 i = floor(p), f = fract(p);\n  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\n// glowing neon grid on a dark field -> refraction reads as bending lines\nvec3 bg(vec2 p){\n  vec2 q = p*5.0;\n  float dx = abs(fract(q.x + 0.5) - 0.5);\n  float dy = abs(fract(q.y + 0.5) - 0.5);\n  float lx = 0.012 / (dx*dx + 0.012);                       // glowing vertical lines\n  float ly = 0.012 / (dy*dy + 0.012);                       // glowing horizontal lines\n  float node = lx * ly;                                     // bright cell corners\n  float hs = hue + 0.05*q.x + 0.04*q.y;                     // hue drifts across the grid\n  vec3 col = vec3(0.015, 0.01, 0.04);                       // dark base\n  col += pal(hs)        * lx * 0.9;\n  col += pal(hs + 0.3)  * ly * 0.9;\n  col += vec3(1.0, 0.95, 1.0) * pow(node, 0.7) * 0.5;       // hot intersections\n  return col;\n}\n\n// wave height field (orbiting offset -> seamless loop)\nfloat waveH(vec2 p, float th){\n  vec2 o1 = 0.35*vec2(cos(th), sin(th));\n  vec2 o2 = 0.30*vec2(cos(2.0*th + 1.0), sin(2.0*th + 1.0));\n  float h = vnoise(p*ripple + o1*ripple);\n  h += 0.5*vnoise(p*ripple*2.1 - o2*ripple);\n  h += 0.18*sin(p.x*ripple*3.3 + th*2.0) * cos(p.y*ripple*2.7 - th*2.0);\n  return h;\n}\n\nvoid main(){\n  vec2 uv = (2.0*gl_FragCoord.xy - RENDERSIZE.xy) / RENDERSIZE.y;\n\n  float ph = fract(TIME * speed / PERIOD);\n  float th = TAU * ph;\n\n  // gradient of the wave surface -> refraction direction\n  vec2 e = vec2(0.005, 0.0);\n  float hx = waveH(uv + e.xy, th) - waveH(uv - e.xy, th);\n  float hy = waveH(uv + e.yx, th) - waveH(uv - e.yx, th);\n  vec2 grad = vec2(hx, hy) / (2.0*e.x);\n\n  vec2 disp = refract * grad;\n\n  // chromatic dispersion: sample the backdrop with per-channel offsets\n  float cd = 0.10 * chroma;\n  vec3 col;\n  col.r = bg(uv + disp*(1.0 + cd)).r;\n  col.g = bg(uv + disp).g;\n  col.b = bg(uv + disp*(1.0 - cd)).b;\n\n  // caustic glints on the wave crests (steep gradient = bright, tight + hot)\n  float crest = length(grad);\n  float glint = smoothstep(2.2, 4.5, crest);\n  col += vec3(1.0, 0.97, 0.9) * pow(glint, 2.0) * 0.6;\n\n  // a faint glassy sheen following the surface height\n  float sheen = waveH(uv, th);\n  col *= 0.85 + 0.25*smoothstep(0.2, 1.6, sheen);\n\n  col *= 1.0 - 0.14*dot(uv, uv);\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
    }
  }
}