No Description

triangle.vert 339B

1234567891011121314151617181920
  1. #version 450
  2. layout (location = 0) in vec3 inPos;
  3. layout (location = 1) in vec3 inColor;
  4. layout (location = 0) out vec3 outColor;
  5. out gl_PerVertex {
  6. vec4 gl_Position;
  7. };
  8. layout(push_constant) uniform PushConsts {
  9. mat4 mvp;
  10. } pushConsts;
  11. void main()
  12. {
  13. outColor = inColor;
  14. gl_Position = pushConsts.mvp * vec4(inPos.xyz, 1.0);
  15. }