DISTRHO Plugin Framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
2.3KB

  1. /* ============================================================================
  2. * Freetype GL - A C OpenGL Freetype engine
  3. * Platform: Any
  4. * WWW: http://code.google.com/p/freetype-gl/
  5. * ----------------------------------------------------------------------------
  6. * Copyright 2011,2012 Nicolas P. Rougier. All rights reserved.
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following conditions are met:
  10. *
  11. * 1. Redistributions of source code must retain the above copyright notice,
  12. * this list of conditions and the following disclaimer.
  13. *
  14. * 2. Redistributions in binary form must reproduce the above copyright
  15. * notice, this list of conditions and the following disclaimer in the
  16. * documentation and/or other materials provided with the distribution.
  17. *
  18. * THIS SOFTWARE IS PROVIDED BY NICOLAS P. ROUGIER ''AS IS'' AND ANY EXPRESS OR
  19. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  20. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
  21. * EVENT SHALL NICOLAS P. ROUGIER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  22. * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  23. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  24. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  25. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  26. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  27. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. *
  29. * The views and conclusions contained in the software and documentation are
  30. * those of the authors and should not be interpreted as representing official
  31. * policies, either expressed or implied, of Nicolas P. Rougier.
  32. * ============================================================================
  33. */
  34. uniform sampler2D texture;
  35. uniform vec3 pixel;
  36. uniform mat4 model;
  37. uniform mat4 view;
  38. uniform mat4 projection;
  39. attribute vec3 vertex;
  40. attribute vec4 color;
  41. attribute vec2 tex_coord;
  42. attribute float ashift;
  43. attribute float agamma;
  44. varying float vshift;
  45. varying float vgamma;
  46. void main()
  47. {
  48. vshift = ashift;
  49. vgamma = agamma;
  50. gl_FrontColor = color;
  51. gl_TexCoord[0].xy = tex_coord.xy;
  52. gl_Position = projection*(view*(model*vec4(vertex,1.0)));
  53. }