summaryrefslogtreecommitdiffstats
path: root/wgpu/src/shader/blit.wgsl
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2022-07-03 17:35:31 +0200
committerLibravatar GitHub <noreply@github.com>2022-07-03 17:35:31 +0200
commit66eb6263003c1bbedd1fd14d6b12f172d20a6211 (patch)
tree46253081865e677d7199fd036f0fed309f531ea7 /wgpu/src/shader/blit.wgsl
parente6e3eff8762e9e8350f00b340348dc2261dd0053 (diff)
parent9adc20922d16b990eede1f6c5f059e68efe15d0e (diff)
downloadiced-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/blit.wgsl')
-rw-r--r--wgpu/src/shader/blit.wgsl20
1 files changed, 10 insertions, 10 deletions
diff --git a/wgpu/src/shader/blit.wgsl b/wgpu/src/shader/blit.wgsl
index f8f6e2d4..c2ea223f 100644
--- a/wgpu/src/shader/blit.wgsl
+++ b/wgpu/src/shader/blit.wgsl
@@ -16,19 +16,19 @@ var<private> uvs: array<vec2<f32>, 6> = array<vec2<f32>, 6>(
vec2<f32>(1.0, 1.0)
);
-[[group(0), binding(0)]] var u_sampler: sampler;
-[[group(1), binding(0)]] var u_texture: texture_2d<f32>;
+@group(0) @binding(0) var u_sampler: sampler;
+@group(1) @binding(0) var u_texture: texture_2d<f32>;
struct VertexInput {
- [[builtin(vertex_index)]] vertex_index: u32;
-};
+ @builtin(vertex_index) vertex_index: u32,
+}
struct VertexOutput {
- [[builtin(position)]] position: vec4<f32>;
- [[location(0)]] uv: vec2<f32>;
-};
+ @builtin(position) position: vec4<f32>,
+ @location(0) uv: vec2<f32>,
+}
-[[stage(vertex)]]
+@vertex
fn vs_main(input: VertexInput) -> VertexOutput {
var out: VertexOutput;
out.uv = uvs[input.vertex_index];
@@ -37,7 +37,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 textureSample(u_texture, u_sampler, input.uv);
}