1234567891011121314151617181920212223242526272829 |
- #version 450
- layout (constant_id = 0) const bool InvertY = false;
- layout(location =0) out vec4 V_Color;
- layout(set=0,binding=0) readonly buffer DataBuffer
- {
- float Datas[];
- };
- layout(set=1,binding=0) uniform InfoBuffer
- {
- vec4 Color;
- uint PlotCount;
- float Interval;
- uint PlotIndex;
- uint PlotDataLenght;
- };
- layout(set=1,binding=1) uniform ProjView
- {
- mat4 View;
- mat4 Proj;
- };
- void main()
- {
- V_Color = Color;
- uint index =uint(gl_VertexIndex+PlotIndex*PlotCount);
- gl_Position = Proj*View*vec4(gl_VertexIndex*Interval,Datas[index],0,1);
- }
|