No Description

cube.vert 668B

12345678910111213141516171819202122232425262728293031
  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 UBOScene {
  7. mat4 projection;
  8. mat4 view;
  9. } uboCamera;
  10. layout (set = 0, binding = 1) uniform UBOModel {
  11. mat4 local;
  12. } uboModel;
  13. layout (location = 0) out vec3 outNormal;
  14. layout (location = 1) out vec3 outColor;
  15. layout (location = 2) out vec2 outUV;
  16. out gl_PerVertex {
  17. vec4 gl_Position;
  18. };
  19. void main()
  20. {
  21. outNormal = inNormal;
  22. outColor = inColor;
  23. outUV = inUV;
  24. gl_Position = uboCamera.projection * uboCamera.view * uboModel.local * vec4(inPos.xyz, 1.0);
  25. }