summaryrefslogtreecommitdiffstats
path: root/examples/integration_wgpu/src/shader/vert.wgsl
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2022-01-31 17:01:19 +0700
committerLibravatar GitHub <noreply@github.com>2022-01-31 17:01:19 +0700
commite4ef29ef20724c3d1a4beff39ddfdaf6d45f9683 (patch)
tree6e0c9c38366c9d70204c80fc66bd8e8a7652cf52 /examples/integration_wgpu/src/shader/vert.wgsl
parentc75ed37148b019358b0297171cf31b2577eeb9ae (diff)
parent6f604ab3995cb345aacf183a569589988aa3ad1f (diff)
downloadiced-e4ef29ef20724c3d1a4beff39ddfdaf6d45f9683.tar.gz
iced-e4ef29ef20724c3d1a4beff39ddfdaf6d45f9683.tar.bz2
iced-e4ef29ef20724c3d1a4beff39ddfdaf6d45f9683.zip
Merge pull request #1096 from pacmancoder/feat/wgpu-webgl
Experimental WebGL wgpu backend support
Diffstat (limited to 'examples/integration_wgpu/src/shader/vert.wgsl')
-rw-r--r--examples/integration_wgpu/src/shader/vert.wgsl6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/integration_wgpu/src/shader/vert.wgsl b/examples/integration_wgpu/src/shader/vert.wgsl
new file mode 100644
index 00000000..7ef47fb2
--- /dev/null
+++ b/examples/integration_wgpu/src/shader/vert.wgsl
@@ -0,0 +1,6 @@
+[[stage(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);
+}