weird: added ikeda
This commit is contained in:
34
weird/ikeda.glsl
Normal file
34
weird/ikeda.glsl
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
uniform vec2 u_resolution;
|
||||
uniform float u_time;
|
||||
|
||||
float random(in float x) {
|
||||
return fract(sin(x)*1e6);
|
||||
}
|
||||
|
||||
float randcol(float x, float f, float t) {
|
||||
return step(0.75,random(floor(x*f)-floor(t)));
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec2 st = gl_FragCoord.xy/u_resolution.xy;
|
||||
st.x *= u_resolution.x/u_resolution.y;
|
||||
|
||||
float cols = 8.;
|
||||
float freq = random(floor(u_time))+abs(atan(u_time)*0.1);
|
||||
float t = 40.*u_time*(1.0-freq);
|
||||
|
||||
if (fract(st.y*cols*.5) < .5) t *= -1.0;
|
||||
|
||||
freq += random(floor(st.y*20.));
|
||||
|
||||
float offset = .025;
|
||||
vec3 color = vec3(randcol(st.x, freq*100.+random(freq), t+offset),
|
||||
randcol(st.x, freq*100., t),
|
||||
randcol(st.x, freq*100.+random(freq), t-offset));
|
||||
|
||||
gl_FragColor = vec4(1.-color,1.);
|
||||
}
|
Reference in New Issue
Block a user