Debian Codegraph @

src/LomiriToolkit/privates/shaders/frame.vert

raw
1 /*
2 * Copyright 2016 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Author: Loïc Molinari <[email protected]>
17 */
18
19 #version 440
20
21 layout(location = 0) in vec4 positionAttrib;
22 layout(location = 1) in vec2 outerCoordAttrib;
23 layout(location = 2) in vec2 innerCoordAttrib;
24 layout(location = 3) in vec4 colorAttrib;
25
26 layout(location = 0) out vec2 outerCoord;
27 layout(location = 1) out vec2 innerCoord;
28 layout(location = 2) out vec4 color;
29
30 layout(std140, binding = 0) uniform buf {
31 mat4 qt_Matrix;
32 float qt_Opacity;
33 } ubuf;
34
35
36 void main()
37 {
38 outerCoord = outerCoordAttrib;
39 innerCoord = innerCoordAttrib;
40 color = colorAttrib;
41 gl_Position = ubuf.qt_Matrix * positionAttrib;
42 }