aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickshapes/shaders_ng/wireframe.vert
blob: 69f8872d511fe202f29df2562ea269dcf17ad133 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#version 440

layout(location = 0) in vec4 vertexCoord;
layout(location = 1) in vec3 vertexBarycentric;
layout(location = 0) out vec3 barycentric;

layout(std140, binding = 0) uniform buf {
#if QSHADER_VIEW_COUNT >= 2
    mat4 qt_Matrix[QSHADER_VIEW_COUNT];
#else
    mat4 qt_Matrix;
#endif
} ubuf;

void main()
{
    barycentric = vertexBarycentric;
#if QSHADER_VIEW_COUNT >= 2
    gl_Position = ubuf.qt_Matrix[gl_ViewIndex] * vertexCoord;
#else
    gl_Position = ubuf.qt_Matrix * vertexCoord;
#endif
}