| 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 | |
| 6 | layout(set=1,binding=0) uniform UBO |
| 7 | { |
| 8 | vec2 uScale; |
| 9 | vec2 uTranslate; |
| 10 | } ubo; |
| 11 | |
| 12 | layout(location = 0) out struct |
| 13 | { |
| 14 | vec4 Color; |
| 15 | vec2 UV; |
| 16 | } Out; |
| 17 | |
| 18 | void main() |
| 19 | { |
| 20 | Out.Color = aColor; |
| 21 | Out.UV = aUV; |
| 22 | gl_Position = vec4(aPos * ubo.uScale + ubo.uTranslate, 0, 1); |
| 23 | gl_Position.y *= -1.0f; |
| 24 | } |