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 →
A model marks this as witnessed_generation (honest AI provenance). Leave blank if you hand-authored it.
/*{ "DESCRIPTION": "A camera trapped inside a rotating geode cavity. Its overlapping spiral chambers are dark mineral, while a living Chladni fracture field crawls across the concave walls and opens onto an iridescent void.", "CREDIT": "glslop", "CATEGORIES": ["Raymarch", "3D", "Generative"], "INPUTS": [ { "NAME": "blend", "TYPE": "float", "DEFAULT": 0.2, "MIN": 0.08, "MAX": 0.45 }, { "NAME": "spinTurns", "TYPE": "float", "DEFAULT": 1.0, "MIN": 0.0, "MAX": 3.0 }, { "NAME": "lookTurns", "TYPE": "float", "DEFAULT": 2.0, "MIN": 1.0, "MAX": 4.0 }, { "NAME": "fracture", "TYPE": "float", "DEFAULT": 0.72, "MIN": 0.2, "MAX": 1.0 }, { "NAME": "voidHue", "TYPE": "color", "DEFAULT": [0.08, 0.02, 0.14, 1.0] } ] }*/ #define STEPS 110 #define GEMS 7 #define PI 3.14159265359 #define PERIOD 8.0 #define OUTER_R 1.9 vec3 rotY(vec3 p, float a){ float c = cos(a), s = sin(a); return vec3(c*p.x + s*p.z, p.y, -s*p.x + c*p.z); } float smin(float a, float b, float k){ float h = clamp(0.5 + 0.5*(b - a)/k, 0.0, 1.0); return mix(b, a, h) - k*h*(1.0 - h); } float sdSphere(vec3 p, vec3 c, float r){ return length(p - c) - r; } float cavityField(vec3 p, float spinAngle){ vec3 pr = rotY(p, -spinAngle); float d = sdSphere(pr, vec3(0.0), 0.5); for (int i = 0; i < GEMS; i++){ float a = (float(i) / float(GEMS)) * 2.0 * PI; float rise = 0.22 * sin(a * 2.0); vec3 c = vec3(cos(a) * 0.85, rise, sin(a) * 0.85); float r = 0.46 + 0.04 * cos(a * 3.0); d = smin(d, sdSphere(pr, c, r), blend); } return d; } float map(vec3 p, float spinAngle){ float outer = length(p) - OUTER_R; return max(outer, -cavityField(p, spinAngle)); } vec3 normalAt(vec3 p, float spinAngle){ vec2 e = vec2(0.002, 0.0); return normalize(vec3( map(p + e.xyy, spinAngle) - map(p - e.xyy, spinAngle), map(p + e.yxy, spinAngle) - map(p - e.yxy, spinAngle), map(p + e.yyx, spinAngle) - map(p - e.yyx, spinAngle) )); } vec3 filmColor(float ph){ return 0.5 + 0.5 * cos(2.0 * PI * (fract(ph) + vec3(0.0, 0.33, 0.67))); } float rockGrain(vec3 p){ float a = sin(dot(p, vec3(7.1, 11.7, 5.3))); float b = sin(dot(p, vec3(-4.3, 8.9, 13.1))); return 0.5 + 0.5 * sin(5.0 * a + 3.0 * b + p.y * 9.0); } float mode(vec2 p, float m, float n){ return sin(PI * m * p.x) * sin(PI * n * p.y) - sin(PI * n * p.x) * sin(PI * m * p.y); } float fractureField(vec3 p, float spinAngle, float ph){ // Project two Chladni mode families through the local cavity coordinates so // the fracture network wraps around the rotating wall instead of sitting in // screen space like a flat overlay. vec3 q = rotY(p, -spinAngle * 0.6); vec2 a = q.xy * 1.25 + 0.035 * vec2(sin(q.y * 7.0 + ph * 6.28), cos(q.x * 6.0 - ph * 6.28)); vec2 b = vec2(q.z, q.y) * 1.35; float w = 0.5 + 0.5 * cos(2.0 * PI * ph); float f1 = mode(a, 3.0, 7.0); float f2 = mode(b, 5.0, 4.0); return mix(f1, f2, w); } void main(){ vec2 uv = (gl_FragCoord.xy - 0.5 * RENDERSIZE.xy) / RENDERSIZE.y; float ph = fract(TIME / PERIOD); float spinAngle = 2.0 * PI * ph * spinTurns; float lookAngle = 0.5 * PI + 0.6 * sin(2.0 * PI * ph * lookTurns); vec3 ro = vec3(0.0, 0.0, 0.0); vec3 fwd = rotY(vec3(0.0, 0.0, 1.0), lookAngle); vec3 right = normalize(cross(fwd, vec3(0.0, 1.0, 0.0))); vec3 up = cross(right, fwd); vec3 rd = normalize(fwd * 1.55 + uv.x * right + uv.y * up); float t = 0.02; float hit = -1.0; float glowAcc = 0.0; for (int i = 0; i < STEPS; i++){ vec3 p = ro + rd * t; float d = map(p, spinAngle); glowAcc += 0.01 / (1.0 + 90.0 * d * d); if (d < 0.001){ hit = t; break; } t += d; if (t > 7.0) break; } vec3 col = vec3(0.008, 0.006, 0.018) + glowAcc * filmColor(ph * 2.0 + 0.4) * 0.8; if (hit > 0.0){ vec3 p = ro + rd * hit; vec3 n = normalAt(p, spinAngle); float vDotN = clamp(dot(-rd, n), 0.0, 1.0); float grain = rockGrain(p * 2.2); float strata = 0.5 + 0.5 * cos(p.y * 18.0 + sin(p.x * 5.0 + p.z * 4.0)); float filmPhase = vDotN * 2.8 + p.y * 1.8 + grain * 0.28 + ph + 0.5; vec3 film = filmColor(filmPhase); vec3 mineral = mix(vec3(0.010, 0.007, 0.024), vec3(0.065, 0.016, 0.085), grain); mineral *= 0.65 + 0.35 * strata; vec3 keyDir = normalize(vec3(-0.5, 0.8, 0.35)); vec3 fillDir = normalize(vec3(0.65, -0.25, -0.7)); float key = max(dot(n, keyDir), 0.0); float fill = max(dot(n, fillDir), 0.0); float fres = pow(1.0 - vDotN, 3.0); float glint = pow(max(dot(reflect(rd, n), keyDir), 0.0), 18.0); float depth = exp(-0.24 * hit); vec3 shaded = mineral * (0.10 + 1.75 * key + 0.48 * fill) * depth; shaded += film * (0.035 + 0.22 * key + 0.10 * fres); shaded += fres * vec3(0.16, 0.46, 0.60) + glint * vec3(0.85, 0.56, 0.22); float A = fractureField(p, spinAngle, ph); float node = 1.0 - smoothstep(0.0, 0.06, abs(A)); float branchField = A + 0.10 * sin(p.x * 17.0 + p.y * 9.0 + ph * 6.28318); float branches = 1.0 - smoothstep(0.0, 0.035, abs(branchField)); float scar = max(node, branches * 0.48) * mix(0.55, 1.0, fracture); float crack = smoothstep(0.10, 0.48, scar); float hairline = smoothstep(0.015, 0.18, scar); float crackEdge = clamp(hairline - crack, 0.0, 1.0); vec3 voidCol = voidHue.rgb * (0.35 + 0.65 * filmColor(ph * 0.7 + p.x * 0.22 - p.y * 0.31 + scar * 0.8)); shaded = mix(shaded, voidCol * 0.22, crack * 0.82); shaded += filmColor(ph * 0.7 + p.x * 0.22 - p.y * 0.31) * crackEdge * 0.9; float fog = exp(-0.16 * hit); col = mix(col, shaded, fog); } col = col / (1.0 + col); col = pow(max(col, 0.0), vec3(0.4545)); gl_FragColor = vec4(col, 1.0); }
forking #jvnxq79e — 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.