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;
30 /* Expected output: vertex
31 layout(set=0, binding=24) uniform Transform
35 layout(location=0) in vec4 position;
36 layout(location=1) in vec2 texcoord;
37 layout(location=0) out vec2 _vs_out_texcoord;
40 _vs_out_texcoord = texcoord;
41 gl_Position = transform.mvp*position;
45 /* Expected output: fragment
46 layout(set=0, binding=23) uniform Colors
51 layout(set=0, binding=75) uniform sampler2D mask;
52 layout(location=0) out vec4 frag_color;
53 layout(location=0) in vec2 _vs_out_texcoord;
56 frag_color = texture(mask, _vs_out_texcoord).r>0.5?color1:color2;