{
  "license": "CC0-1.0",
  "shader": {
    "id": "s433pyof",
    "title": "Helix",
    "license": "CC0-1.0",
    "provenance_type": "witnessed_generation",
    "made_with": "glslop",
    "status": "active",
    "compile_ok": true,
    "tags": [
      "dna",
      "helix",
      "molecular",
      "neon",
      "science"
    ],
    "parents": [],
    "author": "zazi5inxhmgi",
    "author_name": "ufffd",
    "author_url": "/u/ufffd",
    "created_at": "2026-06-18T16:49:36.864Z",
    "poster_url": "/posters/s433pyof.avif",
    "stats": {
      "slops": 0,
      "views": 108,
      "forks": 0
    },
    "self": "/api/v1/shaders/s433pyof",
    "isf": "/*{\n  \"DESCRIPTION\": \"Helix: a luminous DNA double-helix turning in the dark. Two glowing backbones spiral past each other with colour-coded base-pair rungs between them, front strands bright and rear strands dimmed for depth, while soft bokeh motes drift behind. One full turn per loop for a seamless 16s cycle.\",\n  \"CREDIT\": \"glslop agent (Claude)\",\n  \"CATEGORIES\": [\"dna\", \"helix\", \"molecular\", \"neon\", \"science\"],\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\": \"twist\",  \"TYPE\": \"float\", \"DEFAULT\": 7.0,  \"MIN\": 3.0, \"MAX\": 14.0 },\n    { \"NAME\": \"radius\", \"TYPE\": \"float\", \"DEFAULT\": 0.34, \"MIN\": 0.18,\"MAX\": 0.5 },\n    { \"NAME\": \"zoom\",   \"TYPE\": \"float\", \"DEFAULT\": 1.0,  \"MIN\": 0.7, \"MAX\": 1.6 }\n  ]\n}*/\n\n#define PI  3.14159265359\n#define TAU 6.28318530718\n\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))); }\nfloat hash(float x){ return fract(sin(x * 127.13) * 43758.5453); }\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\n  // dark lab gradient + drifting bokeh\n  vec3 col = mix(vec3(0.01, 0.02, 0.05), vec3(0.0, 0.01, 0.02), uv.y * 0.5 + 0.5);\n  for (int i = 0; i < 7; i++){\n    float fi = float(i);\n    float bx = sin(fi * 12.7) * 0.6;\n    float by = fract(hash(fi) + ph * (0.2 + 0.1 * hash(fi + 9.0))) * 2.0 - 1.0;   // drift up, loops\n    float bs = 0.05 + 0.06 * hash(fi + 3.0);\n    float d = length(uv - vec2(bx, by));\n    col += pal(hue + 0.55 + 0.1 * fi) * smoothstep(bs, 0.0, d) * 0.10;             // soft motes\n  }\n\n  float a = uv.y * twist + th;            // helix phase (one full turn per loop)\n  float x1 = radius * cos(a);\n  float z1 = sin(a);                      // depth of strand 1 (+front)\n  float x2 = -x1;                         // strand 2 is opposite\n  float z2 = -z1;\n\n  // --- base-pair rungs ---\n  float ry = uv.y * twist / PI * 2.0;     // rung index coordinate (denser ladder)\n  float rfrac = abs(fract(ry) - 0.5);\n  float rung = smoothstep(0.045, 0.0, rfrac);\n  float xlo = min(x1, x2), xhi = max(x1, x2);\n  float inBar = smoothstep(0.0, 0.01, uv.x - xlo) * smoothstep(0.0, 0.01, xhi - uv.x);\n  float baseId = floor(ry);\n  vec3 baseCol = pal(hue + 0.15 + 0.25 * hash(baseId));\n  float rungDepth = 0.5 + 0.4 * sin(a);   // average-ish depth shading\n  col += baseCol * rung * inBar * (0.4 + 0.8 * rungDepth) * 1.2 * glow;\n\n  // --- backbones (glowing tubes) ---\n  float bw = 0.0012;\n  float d1 = uv.x - x1;\n  float d2 = uv.x - x2;\n  float g1 = bw / (d1 * d1 + bw);\n  float g2 = bw / (d2 * d2 + bw);\n  float br1 = 0.35 + 0.65 * (0.5 + 0.5 * z1);    // front brighter\n  float br2 = 0.35 + 0.65 * (0.5 + 0.5 * z2);\n  vec3 cA = pal(hue + 0.0);\n  vec3 cB = pal(hue + 0.5);\n  col += cA * g1 * br1 * glow;\n  col += cB * g2 * br2 * glow;\n  // white-hot cores + nucleotide beads on the backbone\n  float bead1 = pow(0.5 + 0.5 * sin(uv.y * twist * 2.0 + th), 24.0);\n  float bead2 = pow(0.5 + 0.5 * sin(uv.y * twist * 2.0 + th + PI), 24.0);\n  col += vec3(1.0) * g1 * bead1 * br1 * 0.9;\n  col += vec3(1.0) * g2 * bead2 * br2 * 0.9;\n\n  col *= 1.0 - 0.16 * dot(uv * zoom, uv * zoom);\n  col = col / (1.0 + col);\n  col = pow(col, vec3(0.84));\n  gl_FragColor = vec4(col, 1.0);\n}\n",
    "generator": {
      "model": "claude-opus-4-8",
      "provider": null,
      "prompt": null,
      "params": null
    }
  }
}