Created
April 7, 2026 19:54
-
-
Save FikriRNurhidayat/97a282de953093adc5b126d830dac945 to your computer and use it in GitHub Desktop.
Cable?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| precision mediump float; | |
| uniform vec2 u_resolution; | |
| uniform float u_time; | |
| const float PHI = 1.6180339887; | |
| const float TAU = 6.28318530718; | |
| vec3 palette( float t ) { | |
| vec3 a = vec3(0.5, 0.5, 0.5); | |
| vec3 b = vec3(0.5, 0.5, 0.5); | |
| vec3 c = vec3(1.0, 1.0, 1.0); | |
| vec3 d = vec3(0.0, 0.15, 0.3); | |
| return a + b*cos(TAU*(c*t+d) ); | |
| } | |
| void main() { | |
| vec2 uv = gl_FragCoord.xy / u_resolution; | |
| uv -= 0.5; | |
| uv.x *= u_resolution.x / u_resolution.y; | |
| vec2 uv0 = uv; | |
| vec3 o = vec3(0.0); | |
| for (float i = 0.0; i < 4.0; i++) { | |
| uv = fract(uv * 0.5) - .5; | |
| float d = length(uv) * exp(-length(uv0)); | |
| vec3 c = palette(length(uv0) + i * .4 + u_time / 8.0); | |
| float r = length(uv0); | |
| float a = atan(uv0.y, uv0.x); | |
| float s = sin(a * 8. - r * (sin(u_time))); | |
| d = sin(d * (16. * (sin(u_time / 2.0) + 1.0)) + u_time) / 8.; | |
| d = abs(d + s / 5.0); | |
| d = pow(0.01 / d, 1.2); | |
| o += (c * (d)); | |
| } | |
| gl_FragColor = vec4(o, 1.0); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment