1#version 450
2#extension GL_NV_geometry_shader_passthrough : require
3layout(triangles) in;
4
5layout(passthrough) in gl_PerVertex
6{
7    vec4 gl_Position;
8} gl_in[];
9
10layout(passthrough, location = 0) in VertexBlock
11{
12    int a;
13    int b;
14} v1[3];
15
16layout(location = 2) in VertexBlock2
17{
18    int a;
19    layout(passthrough) int b;
20} v2[3];
21
22
23void main()
24{
25    gl_Layer = (gl_InvocationID + v1[0].a) + v2[1].b;
26}
27
28