Advertisement
netgrind

echopons colab shader

Oct 31st, 2015
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #ifdef GL_ES
  2. precision mediump float;
  3. #endif
  4.  
  5. #define PROCESSING_COLOR_SHADER
  6. #define tau 6.28
  7. #define pi 3.14159
  8.  
  9. uniform vec2 u_resolution;
  10. uniform float u_time;
  11.  
  12. void main() {
  13. //initializing shit
  14. vec2 uv = gl_FragCoord.xy / u_resolution;
  15. vec4 c = vec4(1.0);
  16. float p = u_time*tau;
  17.  
  18. //make that shit centered cuz
  19. uv-=.5;
  20. uv*=2.0;
  21.  
  22. //mirror hotizontally!
  23. uv.x = abs(uv.x);
  24.  
  25. //make that shit polar cuz
  26. float a = atan(uv.y,uv.x);
  27. float d = length(uv);
  28.  
  29. //random ass trippy math shit
  30. d += abs(mod(a,d)-d*.5)*5.;
  31. d *= sin((a*d)*4.0+p);
  32.  
  33. //fuuuuck (0,.3,.6)*tau+phase beter then pleb tier hue shift
  34. c.rgb = sin(p+vec3(0.,.33,.66)*tau + d)*.5+.5;
  35.  
  36. gl_FragColor = c;
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement