Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifdef GL_ES
- precision mediump float;
- #endif
- uniform vec2 u_resolution;
- uniform vec2 u_mouse;
- uniform float u_time;
- vec3 colorA = vec3(0.,0.373,0.451);
- vec3 colorB = vec3(0.039,0.576,0.588);
- float plot (vec2 st, float pct){
- return step( pct-0.234, st.x) -
- step( pct+0.018, st.x);
- }
- void main() {
- vec2 st = gl_FragCoord.xy/u_resolution.xy;
- vec3 color = vec3(0.0);
- vec3 pct = vec3(st.y);
- //Build pattern
- pct.g += cos(st.x*sin(u_time/5.0)*25.0) + cos(st.y*sin(u_time/30.0)*15.0);
- pct.b += sin(st.x*sin(u_time/5.0)*25.0) + sin(st.y*sin(u_time/30.0)*15.0);
- // Plot transition lines for each channel
- color = mix(colorA,colorB,plot(st,pct.g));
- color = mix(color,vec3(1.0),plot(st,pct.b));
- gl_FragColor = vec4(color,1.0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement