6 uniform sampler2D mask;
12 #pragma MSP stage(vertex)
13 layout(location=0) in vec4 position;
14 layout(location=1) in vec2 texcoord;
18 gl_Position = transform.mvp*position;
21 #pragma MSP stage(fragment)
22 layout(location=0) out vec4 frag_color;
25 frag_color = texture(mask, texcoord).r > 0.5 ? color1 : color2;
28 /* Expected output: vertex
29 layout(binding=48) uniform Transform
33 layout(location=0) in vec4 position;
34 layout(location=1) in vec2 texcoord;
35 layout(location=0) out vec2 _vs_out_texcoord;
38 _vs_out_texcoord = texcoord;
39 gl_Position = transform.mvp*position;
43 /* Expected output: fragment
44 layout(binding=23) uniform Colors
49 layout(location=0, binding=75) uniform sampler2D mask;
50 layout(location=0) out vec4 frag_color;
51 layout(location=0) in vec2 _vs_out_texcoord;
54 frag_color = texture(mask, _vs_out_texcoord).r>0.5?color1:color2;