Debian Codegraph @

third_party/spirv-cross/reference/opt/shaders/geom/geometry-passthrough.geom

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