diff options
author | 2021-10-21 22:42:14 +0300 | |
---|---|---|
committer | 2022-01-28 21:37:14 +0700 | |
commit | bdca20fc4a3e8f6bd8ffb59de75e6ca0f8a94b6a (patch) | |
tree | 8ea0d2ff0a0d780ff763d7491fc67878f549a615 /examples/integration_wgpu/src/shader | |
parent | c75ed37148b019358b0297171cf31b2577eeb9ae (diff) | |
download | iced-bdca20fc4a3e8f6bd8ffb59de75e6ca0f8a94b6a.tar.gz iced-bdca20fc4a3e8f6bd8ffb59de75e6ca0f8a94b6a.tar.bz2 iced-bdca20fc4a3e8f6bd8ffb59de75e6ca0f8a94b6a.zip |
Experimental wgpu WebGL backend support
- Added missing `draw_cache_align_4x4` call for `brush_glyph` on wasm32 target
- Added WebGL support to `integratio_wgpu` example
- Fixed test.yml CI workflow
- Removed spir-v shader in `integration_wgpu`; Fixed formatting
- Removed redundant `BoxStream` typedef
Diffstat (limited to 'examples/integration_wgpu/src/shader')
-rw-r--r-- | examples/integration_wgpu/src/shader/frag.spv | bin | 352 -> 0 bytes | |||
-rw-r--r-- | examples/integration_wgpu/src/shader/frag.wgsl | 4 | ||||
-rw-r--r-- | examples/integration_wgpu/src/shader/vert.spv | bin | 904 -> 0 bytes | |||
-rw-r--r-- | examples/integration_wgpu/src/shader/vert.wgsl | 6 |
4 files changed, 10 insertions, 0 deletions
diff --git a/examples/integration_wgpu/src/shader/frag.spv b/examples/integration_wgpu/src/shader/frag.spv Binary files differdeleted file mode 100644 index 9d6807c9..00000000 --- a/examples/integration_wgpu/src/shader/frag.spv +++ /dev/null diff --git a/examples/integration_wgpu/src/shader/frag.wgsl b/examples/integration_wgpu/src/shader/frag.wgsl new file mode 100644 index 00000000..a6f61336 --- /dev/null +++ b/examples/integration_wgpu/src/shader/frag.wgsl @@ -0,0 +1,4 @@ +[[stage(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.spv b/examples/integration_wgpu/src/shader/vert.spv Binary files differdeleted file mode 100644 index 0cabc9c0..00000000 --- a/examples/integration_wgpu/src/shader/vert.spv +++ /dev/null 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); +} |