Advertisement
Guest User

Untitled

a guest
Jul 8th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #version 120
  2. // (C) 2009 Dmytry Lavrov. All rights reserved.
  3. varying vec3 delta;
  4. varying vec2 txpos_f;
  5. uniform float t;
  6.  
  7. vec3 AmpColor(float a){
  8.     return pow(vec3(cos(a+4.1)*0.5+0.5, cos(a+2.05)*0.5+0.5, cos(a)*0.5+0.5),vec3(5.0));
  9. }
  10.  
  11. void main (void)
  12. {
  13.  
  14.     float period=400;
  15.     float tt=mod(t-txpos_f.x,period);
  16.     float br=1.0+0.5/(0.01+tt*0.1);
  17.     br*=1.0-tt/period;
  18.     vec3 col=(20.0*AmpColor(0.534563*(-t*2.23463456-txpos_f.x))+vec3(1.0))*br;
  19.  
  20.     //float q=br/length(delta);
  21.     float q=1.0/length(delta);
  22.  
  23.     gl_FragColor = vec4(gl_Color.rgb*col*q, 1.0);//vec4(0.1, 0.1, 0.1, 1.0);
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement