diff --git a/Cargo.toml b/Cargo.toml index 879ccd7..87564bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,5 +30,5 @@ log = "0.4" pollster = "0.2" serde = { version = "1.0", features = ["derive"] } tobj = "3.0" -wgpu = "0.12.0" +wgpu ={ git = "https://github.com/GuilhermeWerner/wgpu" } winit = "0.26.1" diff --git a/Shaders/Triangle.wgsl b/Shaders/Triangle.wgsl index aa5eebe..f80cc2f 100644 --- a/Shaders/Triangle.wgsl +++ b/Shaders/Triangle.wgsl @@ -1,16 +1,16 @@ // Vertex struct VertexInput { - [[location(0)]] position: vec3; - [[location(1)]] color: vec3; + @location(0) position: vec3, + @location(1) color: vec3, }; struct VertexOutput { - [[builtin(position)]] clip_position: vec4; - [[location(0)]] color: vec3; + @builtin(position) clip_position: vec4, + @location(0) color: vec3, }; -[[stage(vertex)]] +@stage(vertex) fn vs_main( model: VertexInput, ) -> VertexOutput { @@ -22,7 +22,7 @@ fn vs_main( // Fragment -[[stage(fragment)]] -fn fs_main(in: VertexOutput) -> [[location(0)]] vec4 { +@stage(fragment) +fn fs_main(in: VertexOutput) -> @location(0) vec4 { return vec4(in.color, 1.0); }