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 ? color : gray;
29 <test>:25: Ternary operator has incompatible types 'vec4' and 'float'