Ingen beskrivning

mirror.vert 505B

12345678910111213141516171819202122232425262728
  1. #version 450
  2. #extension GL_ARB_separate_shader_objects : enable
  3. #extension GL_ARB_shading_language_420pack : enable
  4. layout (location = 0) in vec3 inPos;
  5. layout (location = 1) in vec2 inUV;
  6. layout (binding = 0) uniform UBO
  7. {
  8. mat4 projection;
  9. mat4 model;
  10. } ubo;
  11. layout (location = 0) out vec2 outUV;
  12. layout (location = 1) out vec4 outPos;
  13. out gl_PerVertex
  14. {
  15. vec4 gl_Position;
  16. };
  17. void main()
  18. {
  19. outUV = inUV;
  20. outPos = ubo.projection * ubo.model * vec4(inPos.xyz, 1.0);
  21. gl_Position = outPos;
  22. }