DataReViewPlot.vert 577 B

1234567891011121314151617181920212223242526272829
  1. #version 450
  2. layout (constant_id = 0) const bool InvertY = false;
  3. layout(location =0) out vec4 V_Color;
  4. layout(set=0,binding=0) readonly buffer DataBuffer
  5. {
  6. float Datas[];
  7. };
  8. layout(set=1,binding=0) uniform InfoBuffer
  9. {
  10. vec4 Color;
  11. uint PlotCount;
  12. float Interval;
  13. uint PlotIndex;
  14. uint PlotDataLenght;
  15. };
  16. layout(set=1,binding=1) uniform ProjView
  17. {
  18. mat4 View;
  19. mat4 Proj;
  20. };
  21. void main()
  22. {
  23. V_Color = Color;
  24. uint index =uint(gl_VertexIndex+PlotIndex*PlotCount);
  25. gl_Position = Proj*View*vec4(gl_VertexIndex*Interval,Datas[index],0,1);
  26. }