Ingen beskrivning

uioverlay.vert 486B

12345678910111213141516171819202122232425
  1. #version 450
  2. layout (location = 0) in vec2 inPos;
  3. layout (location = 1) in vec2 inUV;
  4. layout (location = 2) in vec4 inColor;
  5. layout (push_constant) uniform PushConstants {
  6. vec2 scale;
  7. vec2 translate;
  8. } pushConstants;
  9. layout (location = 0) out vec2 outUV;
  10. layout (location = 1) out vec4 outColor;
  11. out gl_PerVertex
  12. {
  13. vec4 gl_Position;
  14. };
  15. void main()
  16. {
  17. outUV = inUV;
  18. outColor = inColor;
  19. gl_Position = vec4(inPos * pushConstants.scale + pushConstants.translate, 0.0, 1.0);
  20. }