1 layout(constant_id=auto) const int max_colors = 2;
8 ColorInfo colors[max_colors];
11 #pragma MSP stage(vertex)
12 layout(location=0) in vec4 position;
15 gl_Position = position;
18 #pragma MSP stage(fragment)
19 layout(location=0) out vec4 frag_color;
22 frag_color = colors[0].color;
25 // Compile mode: module
27 /* Expected output: vertex
28 layout(location=0) in vec4 position;
31 gl_Position = position;
35 /* Expected output: fragment
36 layout(constant_id=953017667) const int max_colors = 2;
41 layout(binding=23) uniform Colors
43 ColorInfo colors[max_colors];
45 layout(location=0) out vec4 frag_color;
48 frag_color = colors[0].color;