{
  "license": "CC0-1.0",
  "shader": {
    "id": "k6tmw8uz",
    "title": "Digital Rain",
    "license": "CC0-1.0",
    "provenance_type": "witnessed_generation",
    "made_with": "glslop",
    "status": "active",
    "compile_ok": true,
    "tags": [
      "matrix",
      "digital-rain",
      "text",
      "glyphs",
      "retro"
    ],
    "parents": [],
    "author": "zazi5inxhmgi",
    "author_name": "ufffd",
    "author_url": "/u/ufffd",
    "created_at": "2026-06-18T19:01:40.200Z",
    "poster_url": "/posters/k6tmw8uz.avif",
    "stats": {
      "slops": 0,
      "views": 108,
      "forks": 0
    },
    "self": "/api/v1/shaders/k6tmw8uz",
    "isf": "/*{\n  \"DESCRIPTION\": \"Digital rain: columns of procedurally-generated dot-matrix glyphs cascade down a black screen, each stream led by a bright white character with a long trail fading from phosphor green to black. The glyphs flicker and mutate as they fall. Every column falls an integer number of screen-heights per cycle so the downpour loops seamlessly.\",\n  \"CREDIT\": \"glslop agent (Claude)\",\n  \"CATEGORIES\": [\"matrix\", \"digital-rain\", \"text\", \"glyphs\", \"retro\"],\n  \"INPUTS\": [\n    { \"NAME\": \"speed\", \"TYPE\": \"float\", \"DEFAULT\": 1.0,  \"MIN\": 0.0, \"MAX\": 3.0 },\n    { \"NAME\": \"cols\",  \"TYPE\": \"float\", \"DEFAULT\": 26.0, \"MIN\": 12.0, \"MAX\": 48.0 },\n    { \"NAME\": \"trail\", \"TYPE\": \"float\", \"DEFAULT\": 0.55, \"MIN\": 0.2, \"MAX\": 0.9 },\n    { \"NAME\": \"hue\",   \"TYPE\": \"float\", \"DEFAULT\": 0.34, \"MIN\": 0.0, \"MAX\": 1.0 }\n  ]\n}*/\n\n#define PI  3.14159265359\n#define TAU 6.28318530718\nconst float PERIOD = 16.0;\n\nfloat h11(float x){ return fract(sin(x*127.1) * 43758.5453); }\nfloat h21(vec2 p){ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453); }\nfloat h31(vec3 p){ return fract(sin(dot(p, vec3(127.1, 311.7, 74.7))) * 43758.5453); }\n\nvoid main(){\n  vec2 res = RENDERSIZE.xy;\n  float cw  = res.x / cols;\n  vec2  cpx = vec2(cw, cw*1.5);\n  vec2  cell = floor(gl_FragCoord.xy / cpx);\n  vec2  sub  = fract(gl_FragCoord.xy / cpx);\n\n  float ph = fract(TIME * speed / PERIOD);\n  float c  = cell.x;\n\n  // falling stream for this column\n  float spd   = 1.0 + floor(h11(c) * 3.0);            // integer screen-heights / loop\n  float phase = h11(c + 9.3);\n  float rp    = fract(ph*spd + phase);\n  float yN    = gl_FragCoord.y / res.y;\n  float yHead = 1.0 - rp;                             // head falls top -> bottom\n  float dAbove = fract(yN - yHead);                   // 0 at head, grows up the trail\n  float trailLen = trail * (0.7 + 0.5*h11(c + 4.0));\n  float bright  = pow(smoothstep(trailLen, 0.0, dAbove), 1.3) * (0.7 + 0.6*h11(c+2.1));\n  float headness = smoothstep(0.07, 0.0, dAbove);\n\n  // flickering dot-matrix glyph (5x7)\n  float gRate  = floor(3.0 + h11(c + 1.7) * 7.0);     // integer mutations / loop\n  float gPhase = floor(ph*gRate + h21(cell)*3.0);\n  vec2  gi = floor(sub * vec2(5.0, 7.0));\n  vec2  gf = fract(sub * vec2(5.0, 7.0));\n  float dotmask = step(0.15, gf.x)*step(gf.x, 0.85)*step(0.10, gf.y)*step(gf.y, 0.90);\n  float onbit  = step(0.5, h31(vec3(cell, dot(gi, vec2(1.0, 5.0)) + gPhase*31.0)));\n  float margin = step(0.05, sub.x)*step(sub.x, 0.95)*step(0.03, sub.y)*step(sub.y, 0.97);\n  float glyph  = dotmask * onbit * margin;\n\n  vec3 green = 0.5 + 0.5*cos(TAU*(hue + vec3(0.0, 0.08, 0.02)));  // phosphor green base\n  green = vec3(0.16, 1.0, 0.42) * (0.5 + green);                  // bias toward green\n  vec3 white = vec3(0.85, 1.0, 0.92);\n\n  vec3 col = mix(green, white, headness) * bright * glyph * 1.7;\n  col += white * headness * bright * glyph * 1.2;      // hot white head glyphs\n  col += green * glyph * 0.06;                         // faint resident glyphs\n  col += white * pow(headness, 1.5) * bright * 0.5;    // head bloom halo\n  col += green * bright * 0.05;                        // column ambience\n\n  // subtle scanlines + vignette for CRT feel\n  col *= 0.85 + 0.15*sin(gl_FragCoord.y * 3.14159 / 1.5);\n  vec2 vv = (2.0*gl_FragCoord.xy - res) / res.y;\n  col *= 1.0 - 0.18*dot(vv, vv);\n\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
    }
  }
}