texture.vert 663 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (C) 2020, Inria
  3. * GRAPHDECO research group, https://team.inria.fr/graphdeco
  4. * All rights reserved.
  5. *
  6. * This software is free for non-commercial, research and evaluation use
  7. * under the terms of the LICENSE.md file.
  8. *
  9. * For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
  10. */
  11. #version 420
  12. #define VERTICAL_FLIP (0)
  13. layout(location = 0) in vec2 in_vertex;
  14. layout(location = 1) in vec2 in_texcoord;
  15. out vec2 tex_coord;
  16. void main(void) {
  17. gl_Position = vec4(in_vertex, 0.0, 1.0);
  18. tex_coord.x = in_texcoord.x;
  19. if (VERTICAL_FLIP==1) {
  20. tex_coord.y = 1.0 - in_texcoord.y;
  21. }
  22. else {
  23. tex_coord.y = in_texcoord.y;
  24. }
  25. }