alphaimgview.vp 691 B

12345678910111213141516171819202122232425262728293031
  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. layout(location = 0) in vec2 in_vertex;
  13. layout(location = 1) in vec2 in_texcoord;
  14. out vec2 tex_coord;
  15. uniform vec4 imagefit;
  16. vec2 fitTexcoord( vec2 tc ) {
  17. tc.x = tc.x*imagefit[0] + imagefit[2+0];
  18. tc.y = tc.y*imagefit[1] + imagefit[2+1];
  19. return tc;
  20. }
  21. void main(void) {
  22. gl_Position = vec4(in_vertex, 0.0, 1.0);
  23. tex_coord = fitTexcoord(in_texcoord);
  24. }