LineAxis.vert 454 B

123456789101112131415161718192021222324
  1. #version 450
  2. layout (constant_id = 0) const bool InvertY = false;
  3. layout(location =0) in vec2 In_Position;
  4. layout(location =0) out vec4 V_Color;
  5. layout(set=0,binding=0) uniform InfoBuffer
  6. {
  7. vec4 Color;
  8. vec2 Offset;
  9. vec2 Spare;
  10. };
  11. layout(set=0,binding=1) uniform ProjView
  12. {
  13. mat4 View;
  14. mat4 Proj;
  15. };
  16. void main()
  17. {
  18. V_Color = Color;
  19. gl_Position = Proj*View*vec4(clamp(In_Position-Offset,vec2(0,-5000),vec2(10000,5000)),0,1);
  20. }