diff options
author | 2022-07-02 15:39:42 +0800 | |
---|---|---|
committer | 2022-07-02 15:39:42 +0800 | |
commit | c148557cabf1fb9127b00b248479de2eb1d1d477 (patch) | |
tree | 1f3fe0a654effa351997e5462fae2536e118f517 /wgpu/src/shader/triangle.wgsl | |
parent | e6e3eff8762e9e8350f00b340348dc2261dd0053 (diff) | |
download | iced-c148557cabf1fb9127b00b248479de2eb1d1d477.tar.gz iced-c148557cabf1fb9127b00b248479de2eb1d1d477.tar.bz2 iced-c148557cabf1fb9127b00b248479de2eb1d1d477.zip |
update `wgpu` to `0.13`
Diffstat (limited to '')
-rw-r--r-- | wgpu/src/shader/triangle.wgsl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/wgpu/src/shader/triangle.wgsl b/wgpu/src/shader/triangle.wgsl index 61d9c5a4..4348cffd 100644 --- a/wgpu/src/shader/triangle.wgsl +++ b/wgpu/src/shader/triangle.wgsl @@ -1,20 +1,20 @@ struct Globals { - transform: mat4x4<f32>; + transform: mat4x4<f32>, }; -[[group(0), binding(0)]] var<uniform> globals: Globals; +@group(0) @binding(0) var<uniform> globals: Globals; struct VertexInput { - [[location(0)]] position: vec2<f32>; - [[location(1)]] color: vec4<f32>; + @location(0) position: vec2<f32>, + @location(1) color: vec4<f32>, }; struct VertexOutput { - [[builtin(position)]] position: vec4<f32>; - [[location(0)]] color: vec4<f32>; + @builtin(position) position: vec4<f32>, + @location(0) color: vec4<f32>, }; -[[stage(vertex)]] +@vertex fn vs_main(input: VertexInput) -> VertexOutput { var out: VertexOutput; @@ -24,7 +24,7 @@ fn vs_main(input: VertexInput) -> VertexOutput { return out; } -[[stage(fragment)]] -fn fs_main(input: VertexOutput) -> [[location(0)]] vec4<f32> { +@fragment +fn fs_main(input: VertexOutput) -> @location(0) vec4<f32> { return input.color; } |