summaryrefslogtreecommitdiffstats
path: root/examples/integration_wgpu/src/shader
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-07-08 19:31:45 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-07-08 19:31:45 +0200
commitfa55dff61db47197a961152285c6a6abfab0b217 (patch)
tree44904afb16a0cab9e22fce0d73a5616676cd426b /examples/integration_wgpu/src/shader
parent1dd1a2f97fc747e15e12b5188dad6c41b0d052ea (diff)
parent66eb6263003c1bbedd1fd14d6b12f172d20a6211 (diff)
downloadiced-fa55dff61db47197a961152285c6a6abfab0b217.tar.gz
iced-fa55dff61db47197a961152285c6a6abfab0b217.tar.bz2
iced-fa55dff61db47197a961152285c6a6abfab0b217.zip
Merge branch 'master' into theming
Diffstat (limited to 'examples/integration_wgpu/src/shader')
-rw-r--r--examples/integration_wgpu/src/shader/frag.wgsl4
-rw-r--r--examples/integration_wgpu/src/shader/vert.wgsl4
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/integration_wgpu/src/shader/frag.wgsl b/examples/integration_wgpu/src/shader/frag.wgsl
index a6f61336..cf27bb56 100644
--- a/examples/integration_wgpu/src/shader/frag.wgsl
+++ b/examples/integration_wgpu/src/shader/frag.wgsl
@@ -1,4 +1,4 @@
-[[stage(fragment)]]
-fn main() -> [[location(0)]] vec4<f32> {
+@fragment
+fn main() -> @location(0) vec4<f32> {
return vec4<f32>(1.0, 0.0, 0.0, 1.0);
}
diff --git a/examples/integration_wgpu/src/shader/vert.wgsl b/examples/integration_wgpu/src/shader/vert.wgsl
index 7ef47fb2..e353e6ba 100644
--- a/examples/integration_wgpu/src/shader/vert.wgsl
+++ b/examples/integration_wgpu/src/shader/vert.wgsl
@@ -1,5 +1,5 @@
-[[stage(vertex)]]
-fn main([[builtin(vertex_index)]] in_vertex_index: u32) -> [[builtin(position)]] vec4<f32> {
+@vertex
+fn main(@builtin(vertex_index) in_vertex_index: u32) -> @builtin(position) vec4<f32> {
let x = f32(1 - i32(in_vertex_index)) * 0.5;
let y = f32(1 - i32(in_vertex_index & 1u) * 2) * 0.5;
return vec4<f32>(x, y, 0.0, 1.0);