diff options
author | 2022-07-03 17:35:31 +0200 | |
---|---|---|
committer | 2022-07-03 17:35:31 +0200 | |
commit | 66eb6263003c1bbedd1fd14d6b12f172d20a6211 (patch) | |
tree | 46253081865e677d7199fd036f0fed309f531ea7 /wgpu/src/shader/triangle.wgsl | |
parent | e6e3eff8762e9e8350f00b340348dc2261dd0053 (diff) | |
parent | 9adc20922d16b990eede1f6c5f059e68efe15d0e (diff) | |
download | iced-66eb6263003c1bbedd1fd14d6b12f172d20a6211.tar.gz iced-66eb6263003c1bbedd1fd14d6b12f172d20a6211.tar.bz2 iced-66eb6263003c1bbedd1fd14d6b12f172d20a6211.zip |
Merge pull request #1378 from Cupnfish/wgpu-0.13
update `wgpu` to `0.13`
Diffstat (limited to 'wgpu/src/shader/triangle.wgsl')
-rw-r--r-- | wgpu/src/shader/triangle.wgsl | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/wgpu/src/shader/triangle.wgsl b/wgpu/src/shader/triangle.wgsl index 61d9c5a4..b24402f8 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; } |