Exp. 001: Event Horizon
- WebGL · Imagen IA
- WebGL, GLSL, JavaScript
- Shader GLSL, lente gravitacional
01 · Qué es
Un agujero negro que devora la luz. El disco de acreción se curva alrededor del horizonte de sucesos en tiempo real, dibujado con un único shader WebGL.
02 · Código
<canvas id="canvas"></canvas>
<script src="space.js"></script>
html, body { margin: 0; height: 100%; background: #000; }
canvas { display: block; width: 100%; height: 100%; }
// Fragmento del shader. «Copiar» copia el archivo completo.
precision highp float;
uniform float u_time;
uniform vec2 u_res;
uniform float u_rotationSpeed;
uniform float u_diskIntensity;
const float RS = 1.0;
const float ISCO = 3.0;
const float DISK_IN = 2.2;
const float DISK_OUT = 14.0;
03 · Cómo se hizo
Demo interactiva
Escrita con Claude Code. WebGL sin librerías, un solo shader de fragmentos.
Imagen para Instagram
Magnific · Google Nano Banana 2.1, escalada con Magnific Upscaler (creative).
Prompt
"A black hole devouring light in deep space, glowing accretion disk bending around the event horizon, minimal and dark"