6 #pragma MSP stage(vertex)
7 layout(location=0) in vec4 position;
8 layout(location=1) in vec3 normal;
9 layout(location=2) in vec2 texcoord;
12 out float light = normal.z;
14 gl_Position = mvp*position;
17 #pragma MSP stage(fragment)
21 vec3 color = texture(tex, texcoord);
25 frag_color = vec4(color, 1.0);
28 /* Expected output: vertex
30 layout(location=0) in vec4 position;
31 layout(location=1) in vec3 normal;
32 layout(location=2) in vec2 texcoord;
34 out vec2 _vs_out_texcoord;
38 _vs_out_texcoord = texcoord;
39 gl_Position = mvp*position;
43 /* Expected output: fragment
44 uniform sampler2D tex;
48 in vec2 _vs_out_texcoord;
52 vec3 color = texture(tex, _vs_out_texcoord);
56 frag_color = vec4(color, 1.0);