3 #pragma MSP stage(vertex)
4 layout(location=0) in vec4 position;
7 out vec2 texcoord = position.xy*0.5+0.5;
8 gl_Position = position;
11 #pragma MSP stage(geometry)
13 layout(triangle_strip, max_vertices=3) out;
16 for(int i=0; i<3; ++i)
23 #pragma MSP stage(fragment)
24 layout(location=0) out vec4 frag_color;
27 frag_color = texture(tex, texcoord);
32 /* Expected output: vertex
33 layout(location=0) in vec4 position;
34 layout(location=0) out vec2 texcoord;
37 texcoord = position.xy*0.5+0.5;
38 gl_Position = position;
42 /* Expected output: geometry
44 layout(triangle_strip, max_vertices=3) out;
45 layout(location=0) in vec2 texcoord[3];
46 layout(location=0) out vec2 _gs_out_texcoord;
49 for(int i = 0; i<3; ++i)
51 gl_Position = gl_in[i].gl_Position;
52 _gs_out_texcoord = texcoord[i];
58 /* Expected output: fragment
59 layout(set=0, binding=71) uniform sampler2D tex;
60 layout(location=0) out vec4 frag_color;
61 layout(location=0) in vec2 _gs_out_texcoord;
64 frag_color = texture(tex, _gs_out_texcoord);