Debian Codegraph @

tests/manual/rhi/tex3d/texture3d.vert

raw
1 #version 440
2
3 layout(location = 0) in vec4 position;
4 layout(location = 1) in vec2 texcoord;
5
6 layout(location = 0) out vec2 v_texcoord;
7
8 layout(std140, binding = 0) uniform buf {
9 mat4 mvp;
10 int flip;
11 int idx;
12 } ubuf;
13
14 out gl_PerVertex { vec4 gl_Position; };
15
16 void main()
17 {
18 v_texcoord = vec2(texcoord.x, texcoord.y);
19 if (ubuf.flip != 0)
20 v_texcoord.y = 1.0 - v_texcoord.y;
21 gl_Position = ubuf.mvp * position;
22 }