combinedTextureVertexShader.glsl 1015 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /*
  3. * This file is part of the LibreOffice project.
  4. *
  5. * This Source Code Form is subject to the terms of the Mozilla Public
  6. * License, v. 2.0. If a copy of the MPL was not distributed with this
  7. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  8. */
  9. #version 130
  10. attribute vec4 position;
  11. attribute vec2 tex_coord_in;
  12. attribute vec2 mask_coord_in;
  13. attribute vec2 alpha_coord_in;
  14. #ifdef USE_VERTEX_COLORS
  15. attribute vec4 vertex_color_in;
  16. #endif
  17. varying vec2 tex_coord;
  18. varying vec2 mask_coord;
  19. varying vec2 alpha_coord;
  20. #ifdef USE_VERTEX_COLORS
  21. varying vec4 vertex_color;
  22. #endif
  23. uniform mat4 mvp;
  24. uniform mat4 transform;
  25. uniform int type;
  26. void main()
  27. {
  28. gl_Position = mvp * transform * position;
  29. tex_coord = tex_coord_in;
  30. mask_coord = mask_coord_in;
  31. alpha_coord = alpha_coord_in;
  32. #ifdef USE_VERTEX_COLORS
  33. vertex_color = vertex_color_in / 255.0;
  34. #endif
  35. }
  36. /* vim:set shiftwidth=4 softtabstop=4 expandtab: */