struct VSOut {
@builtin(position) pos: vec4<f32>,
@location(0) color: vec4<f32>,
};
@vertex
fn vs_main(
@location(0) pos: vec2<f32>,
@location(1) color: vec4<f32>,
) -> VSOut {
return VSOut(vec4(pos, 0.0, 1.0), color);
}
@fragment
fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
return vec4(in.color.rgb * in.color.a, in.color.a);
}