mesh_debugview.vp 831 B

12345678910111213141516171819202122232425262728293031323334
  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. uniform mat4 MVP;
  13. uniform mat4 invMV;
  14. uniform bool hasColor = true;
  15. uniform vec3 defaultColor = vec3(0.9,0.9,0.9);
  16. layout(location = 0) in vec3 in_vertex;
  17. layout(location = 1) in vec3 in_color;
  18. layout(location = 3) in vec3 in_normal;
  19. out vec3 color_vert;
  20. out vec3 vertexPos;
  21. out vec3 normalPos;
  22. void main(void) {
  23. gl_Position = MVP * vec4(in_vertex,1.0);
  24. vertexPos = vec3(MVP * vec4(in_vertex,1.0));
  25. normalPos = vec3(vec4(in_normal,1.0));
  26. color_vert = hasColor ? in_color : defaultColor;
  27. }