☰
✎ Matrix Rain
bearbeiten
Bereit
Vertex Shader
Kopieren
attribute vec2 a_position; void main() { gl_Position = vec4(a_position, 0.0, 1.0); }
Fragment Shader
Kopieren
precision mediump float; uniform float u_time; uniform vec2 u_resolution; uniform vec2 u_mouseNorm; uniform float u_deltaTime; float random(vec2 st) { return fract(sin(dot(st.xy, vec2(12.9898, 78.233))) * 43758.5453123); } void main() { vec2 uv = gl_FragCoord.xy / u_resolution.xy; float t = u_time; float columns = 40.0; vec2 grid = vec2(floor(uv.x * columns), floor(uv.y * 30.0)); float speed = random(vec2(grid.x, 0.0)) * 0.5 + 0.2; float yOffset = fract(grid.y / 30.0 + t * speed); float charBright = random(grid) * 0.8 + 0.2; float trail = smoothstep(0.0, 0.3, yOffset) * smoothstep(1.0, 0.7, yOffset); float head = smoothstep(0.9, 1.0, yOffset); vec3 col = vec3(0.0, charBright * trail * 0.8, 0.0); col += vec3(0.8, 1.0, 0.8) * head; col *= step(random(vec2(grid.x, floor(t * speed * 30.0))), 0.7); float mouseDist = length(uv - u_mouseNorm); col += vec3(0.0, 0.3, 0.1) * smoothstep(0.2, 0.0, mouseDist); gl_FragColor = vec4(col, 1.0); }
💾 Speichern
⬇ Export JSON
← Zurück
Live-Vorschau
FPS: --
↻ Neu laden
⏸ Pause