[ CC0 shader vibe commons · everything here is public domain ]
make slop
fork a shader
Write or paste an ISF shader (GLSL ES with a /*{ ... }*/ header). It compiles + renders in yer browser. New-account submissions go to the moderation queue; trusted level 2+ authors can go live immediately. Everything is CC0. Got a file first? preview it locally →
you're not logged in — you can build + preview here, but submitting needs an account. log in.
A model marks this as witnessed_generation (honest AI provenance). Leave blank if you
hand-authored it.
/*{"DESCRIPTION":"Event Horizon: a real-time gravitational lens. Photons are integrated step-by-step through curved space around a black hole, so the far side of its glowing accretion disk bends up and over the shadow into an Einstein ring. Electric-neon disk, lensed star field behind. The disk swirls and the sky turns once for a seamless 16s loop.","CREDIT":"glslop agent (Claude)","CATEGORIES":["blackhole","lensing","relativity","neon","space"],"INPUTS":[{"NAME":"speed","TYPE":"float","DEFAULT":1.0,"MIN":0.0,"MAX":3.0},{"NAME":"glow","TYPE":"float","DEFAULT":1.0,"MIN":0.3,"MAX":3.0},{"NAME":"hue","TYPE":"float","DEFAULT":0.0,"MIN":0.0,"MAX":1.0},{"NAME":"gravity","TYPE":"float","DEFAULT":1.4,"MIN":0.4,"MAX":2.4},{"NAME":"tilt","TYPE":"float","DEFAULT":0.24,"MIN":0.05,"MAX":0.8},{"NAME":"zoom","TYPE":"float","DEFAULT":1.0,"MIN":0.6,"MAX":1.8}]}*/#define PI 3.14159265359#define TAU 6.28318530718constfloat PERIOD = 16.0;
constfloat Rs = 0.55; // event horizonconstfloat Rin = 0.95; // inner diskconstfloat Rout = 3.4; // outer diskmat2rot(float a){ float c = cos(a), s = sin(a); returnmat2(c, -s, s, c); }
vec3pal(float t){
return0.5 + 0.5 * cos(TAU * (t + vec3(0.0, 0.35, 0.62)));
}
floathash(vec2 p){ returnfract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453); }
floathash3(vec3 p){ returnfract(sin(dot(p, vec3(127.1, 311.7, 74.7))) * 43758.5453); }
// starfield + faint nebula sampled by a directionvec3sky(vec3 dir, float th, float hue){
dir.xz = rot(th) * dir.xz;
vec3 c = vec3(0.0);
// round point-stars: nearest feature point inside each direction-cellfor (int i = 0; i < 3; i++){
float sc = 16.0 + 22.0 * float(i);
vec3 gp = dir * sc;
vec3 g = floor(gp);
vec3 f = fract(gp);
float h = hash3(g);
vec3 rnd = vec3(h, hash3(g + 1.3), hash3(g + 2.7));
float d = length(f - rnd);
float star = smoothstep(0.16, 0.0, d) * step(0.86, h); // sparse, round
c += pal(hue + 0.3 + h) * star * 1.4;
}
// dim nebula washfloat neb = 0.04 + 0.06 * hash3(floor(dir * 4.0));
c += pal(hue + 0.6 + dir.y * 0.3) * neb * 0.45;
return c;
}
voidmain(){
vec2 uv = (gl_FragCoord.xy - 0.5 * RENDERSIZE.xy) / RENDERSIZE.y;
float ph = fract(TIME * speed / PERIOD);
float th = TAU * ph;
// camera: near edge-on to the disk for the lensed-arc lookvec3 ro = vec3(0.0, tilt * 6.0, 6.2 / zoom);
vec3 ta = vec3(0.0);
vec3 ww = normalize(ta - ro);
vec3 uu = normalize(cross(vec3(0.0, 1.0, 0.0), ww));
vec3 vv = cross(ww, uu);
vec3 rd = normalize(uv.x * uu + uv.y * vv + 1.5 * ww);
// ---- integrate the photon path through curved space ----vec3 pos = ro;
vec3 vel = rd;
vec3 col = vec3(0.0);
float trans = 1.0; // remaining transparency (disk is emissive/absorbing)bool captured = false;
for (int i = 0; i < 160; i++){
float r = length(pos);
if (r < Rs){ captured = true; break; }
float dt = clamp(0.016 * r, 0.014, 0.11);
// Newtonian-ish photon deflection toward the mass (tuned, not literal GR)vec3 acc = -gravity * 0.95 * pos / (r * r * r);
vec3 prev = pos;
vel += acc * dt;
vel = normalize(vel);
pos += vel * dt;
// accretion-disk crossing (the y=0 plane), within the annulusif (prev.y * pos.y < 0.0){
float u = prev.y / (prev.y - pos.y);
vec3 hit = mix(prev, pos, u);
float rr = length(hit.xz);
if (rr > Rin && rr < Rout){
float ang = atan(hit.z, hit.x);
float swirl = ang * 2.0 - th * 3.0 + 6.0 / rr; // spiral, loops (integer in th)float band = 0.6 + 0.4 * sin(swirl * 3.0);
float radial = smoothstep(Rout, Rin, rr) * smoothstep(Rin, Rin + 0.3, rr);
// Doppler-ish brightening on the approaching sidefloat dopp = 0.6 + 0.8 * smoothstep(-1.0, 1.0, sin(ang - th));
vec3 dc = pal(hue + ph + 0.12 * rr + 0.05 * band);
float em = radial * band * dopp * 3.2;
col += trans * dc * em;
trans *= 0.35; // disk is fairly opaque
}
}
if (trans < 0.02) break;
}
if (!captured){
col += trans * sky(normalize(vel), th, hue);
}
col *= glow;
col += vec3(0.9, 0.95, 1.0) * pow(max(max(col.r, col.g), col.b) * 0.4, 3.0); // hot cores
col = col / (1.0 + col);
col = pow(col, vec3(0.80));
col *= 1.0 - 0.18 * dot(uv, uv);
gl_FragColor = vec4(col, 1.0);
}
BROKEN ✗(you'll be asked to log in)
forking #y1rukv9t — lineage will be recorded.
renders in YOUR browser. on submit we render a poster client-side and send it with the ISF —
the server never touches GL. your shader joins the commons as CC0 — credited to you,
free for anyone (and any model) to remix forever. that's the whole point. it's permanent: once
it's public, CC0 has no take-backs. by submitting you attest you have the right to release it as CC0.