No Description

cube.vert 618B

12345678910111213141516171819202122232425262728
  1. #version 450
  2. layout (location = 0) in vec3 inPos;
  3. layout (location = 1) in vec3 inNormal;
  4. layout (location = 2) in vec2 inUV;
  5. layout (location = 3) in vec3 inColor;
  6. layout (set = 0, binding = 0) uniform UBOMatrices {
  7. mat4 projection;
  8. mat4 view;
  9. mat4 model;
  10. } uboMatrices;
  11. layout (location = 0) out vec3 outNormal;
  12. layout (location = 1) out vec3 outColor;
  13. layout (location = 2) out vec2 outUV;
  14. out gl_PerVertex {
  15. vec4 gl_Position;
  16. };
  17. void main()
  18. {
  19. outNormal = inNormal;
  20. outColor = inColor;
  21. outUV = inUV;
  22. gl_Position = uboMatrices.projection * uboMatrices.view * uboMatrices.model * vec4(inPos.xyz, 1.0);
  23. }