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).rgb;
25 frag_color = vec4(color, 1.0);
28 /* Expected output: vertex
29 layout(location=0) uniform mat4 mvp;
30 layout(location=0) in vec4 position;
31 layout(location=1) in vec3 normal;
32 layout(location=2) in vec2 texcoord;
33 layout(location=0) out float light;
34 layout(location=1) out vec2 _vs_out_texcoord;
38 _vs_out_texcoord = texcoord;
39 gl_Position = mvp*position;
43 /* Expected output: fragment
44 layout(location=4, binding=71) uniform sampler2D tex;
45 layout(location=5) uniform vec3 tint;
46 layout(location=6) uniform vec3 ambient;
47 layout(location=0) out vec4 frag_color;
48 layout(location=1) in vec2 _vs_out_texcoord;
49 layout(location=0) in float light;
52 vec3 color = texture(tex, _vs_out_texcoord).rgb;
56 frag_color = vec4(color, 1.0);