847: Don't pin web-sys and wasm-bindgen versions r=grovesNL a=RichoDemus
Pinning them forces all downstream dependencies to use exactly this version
The latest release of wgpu has pinned an old version of wasm-bindgen, forcing users to downgrade wasm-bindgen-cli in order to build
Co-authored-by: Richard Tjerngren <git@richodemus.com>
Co-authored-by: RichoDemus <git@richodemus.com>
Pinning them forces all downstream dependencies to use exactly this version
The latest release of wgpu has pinned an old version of wasm-bindgen, forcing users to downgrade wasm-bindgen-cli in order to build
827: Fixed water example file section in the README.md r=cwfitzgerald a=Dy11on
Fixed the file section in the README.md for the water example, since it now uses wgsl
Co-authored-by: Dy11on <26803229+Dy11on@users.noreply.github.com>
824: make all labels use `wgpu::Label` r=kvark a=LU15W1R7H
This PR does a very minor change.
It replaces all occurences of `label: Option<'a str>` with `label: crate::Label`,
making the usage consistent all across the API.
This doesn't bring any benefit other than consistency.
I hope to have catched every occurance.
Co-authored-by: Luis Wirth <lwirth2000@gmail.com>
823: Fix crash-on-resize in skybox example r=kvark a=danwilhelm
Problem: Skybox example currently crashes on resize.
- Solution: Now, recreates depth texture on resize event.
---
Problem: Shadow example currently duplicates texture creation code on resize.
- Solution: Now, shadow is refactored identically to skybox & water examples -- minimizes code duplication, makes examples more similar.
Co-authored-by: Dan Wilhelm <dan@danwilhelm.com>
819: Boost texels alpha channel in cube example. r=kvark a=VincentFTS
Permits to have a good rendering for WebGL.
822: Update wasm-bindgen and web-sys to latest r=kvark a=grovesNL
#821 for `master`
On `master` it should be ok to update wasm-bindgen and web-sys, so we don't need to fix syn's version
Co-authored-by: VincentFTS <platforms@ftsoftware.fr>
Co-authored-by: Joshua Groves <josh@joshgroves.com>
814: Update to latest wgpu, naga, gfx. r=kvark a=Gordon-F
Update to latest wgpu, naga, gfx and enable `EXPERIMENTAL_TRANSLATION` with GL backend for `boids`, `cube` and `hello-compute`.
Co-authored-by: Gordon-F <ishaposhnik@icloud.com>
813: Fix dropping for command encoders r=grovesNL a=kvark
We weren't dropping them properly, and since the ID is just an obfuscated `Box<RealStuff>` that made the contents leak.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
809: Add overflow detection to hello-compute r=kvark a=danwilhelm
Description
The `hello-compute` example sometimes gives incorrect results if an intermediate Collatz value overflows.
Proposed Solution
We can detect overflows before they occur, since the `3n+1` step is the only possible overflow. (WGSL only supports u32.)
Example
`cargo run --example hello-compute 77031 837799 8400511 63728127`
> Incorrect Current Output: `[350, 524, 312, 346]`
> Correct Output: `[350, 524, 685, 949]`
> Proposed Solution: `[350, 524, OVERFLOW, OVERFLOW]`
Notes
- The `hello-compute` example appears to be [borrowed from naga](https://github.com/gfx-rs/naga/blob/master/tests/in/collatz.wgsl), so this would cause the implementations to differ.
- Hexadecimal literals are not yet implemented in naga for WGSL shaders, so the shader literals are not as pretty as they could be.
- Revised terminology `times` -> `steps` to be consistent with [Wikipedia](https://en.wikipedia.org/wiki/Collatz_conjecture).
Co-authored-by: Dan Wilhelm <dan@danwilhelm.com>
806: Remove "how to compile the shaders" section on README r=kvark a=yutannihilation
I believe all the examples now use WGSL, so this section is no longer needed.
Co-authored-by: Hiroaki Yutani <yutani.ini@gmail.com>