update wgpu to 0.13

This commit is contained in:
Cupnfish 2022-07-02 15:39:42 +08:00
parent e6e3eff876
commit c148557cab
15 changed files with 140 additions and 144 deletions

View file

@ -1,4 +1,4 @@
[[stage(fragment)]]
fn main() -> [[location(0)]] vec4<f32> {
@fragment
fn main() -> @location(0) vec4<f32> {
return vec4<f32>(1.0, 0.0, 0.0, 1.0);
}

View file

@ -1,5 +1,5 @@
[[stage(vertex)]]
fn main([[builtin(vertex_index)]] in_vertex_index: u32) -> [[builtin(position)]] vec4<f32> {
@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);