2022-10-26 15:20:47 +00:00
|
|
|
const pos = array<vec2<f32>, 3>(vec2(0.0, 0.5), vec2(-(0.5), -(0.5)), vec2(0.5, -(0.5)));
|
2022-01-06 18:11:01 +00:00
|
|
|
|
2022-06-07 13:55:34 +00:00
|
|
|
@vertex
|
2022-01-19 22:46:57 +00:00
|
|
|
fn vtx_main(@builtin(vertex_index) VertexIndex : u32) -> @builtin(position) vec4<f32> {
|
2021-05-18 09:24:18 +00:00
|
|
|
return vec4<f32>(pos[VertexIndex], 0.0, 1.0);
|
|
|
|
}
|
|
|
|
|
2022-06-07 13:55:34 +00:00
|
|
|
@fragment
|
2022-01-19 22:46:57 +00:00
|
|
|
fn frag_main() -> @location(0) vec4<f32> {
|
2021-05-18 09:24:18 +00:00
|
|
|
return vec4<f32>(1.0, 0.0, 0.0, 1.0);
|
|
|
|
}
|