4 #pragma MSP stage(vertex)
5 layout(location=0) in vec4 position;
8 out vec2 texcoord = position.xy*0.5+0.5;
9 gl_Position = position;
12 #pragma MSP stage(geometry)
14 layout(triangle_strip, max_vertices=3) out;
28 #pragma MSP stage(fragment)
29 layout(location=0) out vec4 frag_color;
32 frag_color = texture(tex, texcoord);
35 /* Expected output: vertex
36 layout(location=0) in vec4 position;
37 layout(location=0) out vec2 texcoord;
40 texcoord = position.xy*0.5+0.5;
41 gl_Position = position;
45 /* Expected output: geometry
46 layout(location=0) uniform int flag;
48 layout(triangle_strip, max_vertices=3) out;
49 layout(location=0) in vec2 texcoord[];
50 layout(location=0) out vec2 _gs_out_texcoord;
53 gl_Position = gl_in[0].gl_Position;
54 _gs_out_texcoord = texcoord[0];
57 gl_Position = gl_in[1].gl_Position;
58 _gs_out_texcoord = texcoord[1];
61 gl_Position = gl_in[2].gl_Position;
62 _gs_out_texcoord = texcoord[2];
68 /* Expected output: fragment
69 layout(location=1, binding=71) uniform sampler2D tex;
70 layout(location=0) out vec4 frag_color;
71 layout(location=0) in vec2 _gs_out_texcoord;
74 frag_color = texture(tex, _gs_out_texcoord);