aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/shaders_ng/shadereffect.vert
blob: e030b5ee715873c311cd3cae5332a7231ab7e620 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#version 440

layout(location = 0) in vec4 qt_Vertex;
layout(location = 1) in vec2 qt_MultiTexCoord0;

layout(location = 0) out vec2 qt_TexCoord0;

layout(std140, binding = 0) uniform qt_buf {
#if QSHADER_VIEW_COUNT >= 2
    mat4 qt_Matrix[QSHADER_VIEW_COUNT];
#else
    mat4 qt_Matrix;
#endif
    float qt_Opacity;
} qt_ubuf; // must use a name that does not clash with custom code when no uniform blocks

void main()
{
    qt_TexCoord0 = qt_MultiTexCoord0;
#if QSHADER_VIEW_COUNT >= 2
    gl_Position = qt_ubuf.qt_Matrix[gl_ViewIndex] * qt_Vertex;
#else
    gl_Position = qt_ubuf.qt_Matrix * qt_Vertex;
#endif
}