From c148557cabf1fb9127b00b248479de2eb1d1d477 Mon Sep 17 00:00:00 2001 From: Cupnfish Date: Sat, 2 Jul 2022 15:39:42 +0800 Subject: update `wgpu` to `0.13` --- wgpu/src/shader/triangle.wgsl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'wgpu/src/shader/triangle.wgsl') 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; + transform: mat4x4, }; -[[group(0), binding(0)]] var globals: Globals; +@group(0) @binding(0) var globals: Globals; struct VertexInput { - [[location(0)]] position: vec2; - [[location(1)]] color: vec4; + @location(0) position: vec2, + @location(1) color: vec4, }; struct VertexOutput { - [[builtin(position)]] position: vec4; - [[location(0)]] color: vec4; + @builtin(position) position: vec4, + @location(0) color: vec4, }; -[[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 { +@fragment +fn fs_main(input: VertexOutput) -> @location(0) vec4 { return input.color; } -- cgit