3 #pragma MSP stage(vertex)
4 layout(location=0) in vec4 position;
11 vs_out.texcoord = position.xy*0.5+0.5;
12 gl_Position = position;
15 #pragma MSP stage(geometry)
17 layout(triangles, max_vertices=3) out;
24 for(int i=0; i<3; ++i)
26 gs_out.texcoord = vs_out[i].texcoord;
32 #pragma MSP stage(fragment)
33 layout(location=0) out vec4 frag_color;
36 frag_color = texture(tex, gs_out.texcoord);
39 /* Expected output: vertex
40 layout(location=0) in vec4 position;
47 vs_out.texcoord = position.xy*0.5+0.5;
48 gl_Position = position;
52 /* Expected output: geometry
54 layout(triangles, max_vertices=3) out;
65 for(int i = 0; i<3; ++i)
67 gs_out.texcoord = vs_out[i].texcoord;
68 gl_Position = gl_in[i].gl_Position;
74 /* Expected output: fragment
75 uniform sampler2D tex;
76 layout(location=0) out vec4 frag_color;
83 frag_color = texture(tex, gs_out.texcoord);