summaryrefslogtreecommitdiffstats
path: root/examples/integration_wgpu/src/shader/vert.wgsl
blob: 7ef47fb222873fb2249d0b1c36bcad98c3e33dd6 (plain) (blame)
1
2
3
4
5
6
[[stage(vertex)]]
fn main([[builtin(vertex_index)]] in_vertex_index: u32) -> [[builtin(position)]] vec4<f32> {
    let x = f32(1 - i32(in_vertex_index)) * 0.5;
    let y = f32(1 - i32(in_vertex_index & 1u) * 2) * 0.5;
    return vec4<f32>(x, y, 0.0, 1.0);
}