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);
30 /* Expected output: vertex
31 layout(location=0) uniform mat4 mvp;
32 layout(location=0) in vec4 position;
33 layout(location=1) in vec3 normal;
34 layout(location=2) in vec2 texcoord;
35 layout(location=0) out float light;
36 layout(location=1) out vec2 _vs_out_texcoord;
40 _vs_out_texcoord = texcoord;
41 gl_Position = mvp*position;
42 gl_Position.z = gl_Position.z*2.0-gl_Position.w;
46 /* Expected output: fragment
47 layout(location=4, binding=71) uniform sampler2D tex;
48 layout(location=5) uniform vec3 tint;
49 layout(location=6) uniform vec3 ambient;
50 layout(location=0) out vec4 frag_color;
51 layout(location=1) in vec2 _vs_out_texcoord;
52 layout(location=0) in float light;
55 vec3 color = texture(tex, _vs_out_texcoord).rgb;
59 frag_color = vec4(color, 1.0);