glsl_shader.vert 454 B

1234567891011121314151617181920212223242526
  1. #version 450 core
  2. layout(location = 0) in vec2 aPos;
  3. layout(location = 1) in vec2 aUV;
  4. layout(location = 2) in vec4 aColor;
  5. layout(push_constant) uniform uPushConstant {
  6. vec2 uScale;
  7. vec2 uTranslate;
  8. } pc;
  9. out gl_PerVertex {
  10. vec4 gl_Position;
  11. };
  12. layout(location = 0) out struct {
  13. vec4 Color;
  14. vec2 UV;
  15. } Out;
  16. void main()
  17. {
  18. Out.Color = aColor;
  19. Out.UV = aUV;
  20. gl_Position = vec4(aPos * pc.uScale + pc.uTranslate, 0, 1);
  21. }