cursortrail.fsh 533 B

1234567891011121314151617181920212223
  1. #version 110
  2. uniform float time;
  3. uniform sampler2D tex;
  4. varying vec2 tex_coord;
  5. varying float vtx_alpha;
  6. void main()
  7. {
  8. vec4 color = texture2D(tex, tex_coord);
  9. color.a *= vtx_alpha;
  10. /*
  11. float speedMultiplier = 0.8;
  12. float spreadMultiplier = 2.0;
  13. color.r = sin(time*speedMultiplier + vtx_alpha*spreadMultiplier + 0.0)*0.5 + 0.5;
  14. color.g = sin(time*speedMultiplier + vtx_alpha*spreadMultiplier + 2.0)*0.5 + 0.5;
  15. color.b = sin(time*speedMultiplier + vtx_alpha*spreadMultiplier + 4.0)*0.5 + 0.5;
  16. */
  17. gl_FragColor = color;
  18. }