Advertisement
Guest User

Untitled

a guest
May 24th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. void main()
  2. {
  3. float time=iGlobalTime*1.0;
  4. vec2 uv = (gl_FragCoord.xy / iResolution.xx-0.5);
  5.  
  6. vec2 r_uv = vec2(uv.x, uv.y + cos(time + uv.x*4.) * .1);
  7. vec2 g_uv = vec2(uv.x, uv.y + cos(time + uv.x*5.) * .1);
  8. vec2 b_uv = vec2(uv.x, uv.y + cos(time + uv.x*6.) * .1);
  9.  
  10. uv.y += cos(time + uv.x*4.) * .1;
  11. uv -= vec2(cos(time * .01) * .1);
  12.  
  13. float r_d = length(r_uv);
  14. float g_d = length(g_uv);
  15. float b_d = length(b_uv);
  16.  
  17. float r = smoothstep(0.215, 0.2, r_d);
  18. float g = smoothstep(0.215, 0.2, g_d);
  19. float b = smoothstep(0.215, 0.2, b_d);
  20.  
  21. vec3 color = vec3(r, g, b);
  22.  
  23. gl_FragColor = vec4(color, 1.);
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement