3 const int threshold = 3;
5 #pragma MSP stage(vertex)
6 layout(location=0) in vec4 position;
7 layout(location=1) in vec4 color;
10 gl_Position = position;
14 #pragma MSP stage(fragment)
15 layout(location=0) out vec4 frag_color;
18 if(lod+bias<threshold)
21 frag_color = vec4(1.0);
24 /* Expected output: vertex
25 layout(location=0) in vec4 position;
26 layout(location=1) in vec4 color;
27 out vec4 _vs_out_color;
30 gl_Position = position;
31 _vs_out_color = color;
35 /* Expected output: fragment
36 layout(location=0) out vec4 frag_color;
37 in vec4 _vs_out_color;
40 frag_color = _vs_out_color;