You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

189 lines
11 KiB
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# Awesome wgpu-rs
A curated list of wgpu-rs code and resources.
PRs welcome.
## About wgpu-rs
- https://github.com/gfx-rs/wgpu-rs
- wgpu suports DX11, DX12 and Vulkan on Windows, Vulkan on Linux and Metal on macOS & iOS https://github.com/gfx-rs/wgpu
- [The rise of wgpu - Gfx-rs nuts and bolts](https://gfx-rs.github.io/2019/03/06/wgpu.html)
- https://www.reddit.com/r/rust/comments/ay3olj/the_rise_of_wgpurs/
- https://news.ycombinator.com/item?id=19327043
- current status of WebGPU in web browsers https://webgpu.io
- https://www.reddit.com/r/rust_gamedev/comments/e9nh8w/current_status_of_webgpu_wasm_and_web_games_in/
- https://wiki.alopex.li/AGuideToRustGraphicsLibraries2019
- wgpu-rs and WebGL https://www.reddit.com/r/rust/comments/eh7wkx/the_state_of_ggez_2020/fcipapq/
- wgpu-rs and OpenGL https://www.reddit.com/r/rust/comments/eh7wkx/the_state_of_ggez_2020/fcj2hyq/
- Geometry shaders are effectively a dead end https://www.reddit.com/r/rust/comments/dou249/will_wgpu_support_shader_types_that_are_not/f5r1a6k/
- https://www.reddit.com/r/rust_gamedev/comments/b01zy9/please_help_me_understand_the_gfxrs_architecture/
## Learn
- https://rust-tutorials.github.io/learn-wgpu
- https://github.com/rust-tutorials/learn-wgpu
- https://sotrh.github.io/learn-wgpu/
- https://github.com/sotrh/learn-wgpu
- old https://github.com/fredlangva/WGPU-Tut
- https://www.reddit.com/r/rust_gamedev/comments/bcjdl0/learning_wgpurs_coming_from_openwebgl/
- [3D Game in Rust #2 - Try to run a wgpu-rs tutorial - YouTube](https://www.youtube.com/watch?v=KZTmTbcA-VY)
## Gamedev
- A tiny hardware-accelerated pixel frame buffer https://github.com/parasyte/pixels
- Answer why RedrawRequested event is not implemented https://github.com/rukai/winit_input_helper/issues/3#issuecomment-545316276
- https://github.com/JamesPatrickGill/mos-6502-rusted
- RTS game/engine https://github.com/Ruddle/oxidator
- https://github.com/maroider/overlay
- https://github.com/Noxime/vg-test
- https://github.com/robmikh/goldsrc-asset-viewer
- https://github.com/vulpesgames/mist-game-engine
- https://github.com/chutchinson/chip-8
- https://github.com/Napokue/chip-8
- https://github.com/deadcore/playstation-emulator
- https://github.com/catt-io/romy
- https://github.com/lavignes/dth
- 2D rendering library https://github.com/tonis2/felin
- 2D graphics library https://github.com/cloudhead/rgx used by https://github.com/cloudhead/rx
- https://github.com/StarlitGhost/GBOxide
- A brawl file parser for Super Smash Bros. Brawl https://github.com/rukai/brawllib_rs
- An opinionated 2D game engine https://github.com/hecrj/coffee
- based on old wgpu 0.2
## Rust gamedev
- https://github.com/rust-unofficial/awesome-rust/blob/master/README.md#game-development
- https://www.reddit.com/r/rust_gamedev
- Lack of allocator support in std is a big issue for gamedev. https://www.reddit.com/r/rust/comments/cr5rht/whats_the_state_of_game_development_in_rust/ex3g6e9/
- Game Input Library for Rust https://github.com/Arvamer/gilrs
- Used by https://github.com/parasyte/pixels
- [How to make roguelike games in Rust](http://bfnightly.bracketproductions.com/rustbook/)
- https://news.ycombinator.com/item?id=22020229
- Ultraviolet (linear algebra library specifically for games & graphics which is faster than the alternatives for both runtime and compile times) https://crates.io/crates/ultraviolet
- via https://news.ycombinator.com/item?id=22024916
- experimental const generics based linear algebra library that works without any allocations in no_std and utilizes simd. So now you can do fancy maths on embedded. https://djugei.github.io/optimath-0-3-0/
- https://www.reddit.com/r/rust/comments/eo4ury/show_rrust_optimath_linear_algebra_with_const/
- High performance Rust ECS library https://crates.io/crates/legion
- via https://news.ycombinator.com/item?id=22024916
- The flexibility in Legion is filled with tradeoffs, generally showing benefits in performance and runtime flexibility, while generally trading off some of the ergonomics of the SPECS interface. https://github.com/amethyst/rfcs/issues/22
- https://iolivia.me/posts/entity-component-system-explained/
- https://github.com/rukai/winit_input_helper
- used by pixels and others https://crates.io/crates/winit_input_helper/reverse_dependencies
- experimental Rust library for continuous 2D collision detection in games https://github.com/SergiusIW/collider-rs
- https://github.com/SergiusIW/chirperjax
- development library tailored to 2D pixel-art games. Supports SDL2 or WebAssembly https://github.com/SergiusIW/gate
- https://github.com/SergiusIW/chirperjax
## General gamedev
- https://gafferongames.com/post/fix_your_timestep/
- via https://github.com/17cupsofcoffee/tetra
- https://gafferongames.com/post/integration_basics/
- https://www.reddit.com/r/gamedev/comments/df7dth/i_compiled_a_massive_list_of_yt_channels_about/
## Physics/Collision
- http://arewegameyet.com/categories/physics/
- https://github.com/kvark/vange-rs/blob/master/bin/road/physics/mod.rs
- https://github.com/kvark/vange-rs/blob/master/src/render/collision.rs
- https://github.com/rukai/canon_collision/blob/master/canon_collision/src/collision.rs
## Games
- https://github.com/rukai/canon_collision
- https://github.com/kvark/vange-rs
- https://kvark.github.io/vange-rs/
- In a nutshell, it's Metal with Vulkan's binding model https://www.reddit.com/r/rust_gamedev/comments/bcjdl0/learning_wgpurs_coming_from_openwebgl/ektqwx3/
- https://github.com/Technici4n/voxel-rs
- 2D, space invaders clone https://github.com/parasyte/pixels/tree/master/examples/invaders
- 2D, game of life https://github.com/parasyte/pixels/tree/master/examples/conway
- https://github.com/terrence2/openfa
- https://github.com/derekdreery/rogue
- https://github.com/Limvot/vulkemon
- https://github.com/glalonde/spout/tree/master/rust
- https://github.com/Limvot/vulkemon
## Applications
- pixel editor https://github.com/cloudhead/rx
- https://github.com/Yatekii/sailor
- https://github.com/manuranga/igni
- https://github.com/stevebob/rip
- https://github.com/chiptunecafe/rawrscope
- https://github.com/cbrewster/brewcode
- https://github.com/Elyhaka/Swaynimated
- https://github.com/CryZe/livesplit-one-desktop
- HDR image viewer https://github.com/mandeep/viewimg
- Radiance HDR images (and later OpenEXR)
## Examples
- https://github.com/gfx-rs/wgpu-rs/tree/master/examples
- https://github.com/LordBenjamin/sharp-and-rusty
- https://github.com/rohit507/rust-gfx-experiments
- https://github.com/stevebob/hello-wgpu
- https://github.com/vitvakatu/cubes
- https://github.com/laopo001/wgpu-learn
- https://github.com/xayon40-12/wgpu_ray
- https://github.com/maroider/wgpu_playground
- https://github.com/terrence2/stampede
- https://github.com/Lonsdaleiter/RustTest
- iOS and Metal https://github.com/grenlight/idroid_demo
### Older
- https://github.com/timokoesters/wgpu-project
- https://github.com/WaDelma/hiekkapeli
- https://github.com/krauslabs/wgpu-vg-toy
- https://github.com/fredlangva/wgpu_one
- https://www.reddit.com/r/rust/comments/c9wsot/i_need_some_help_with_wgpu/
- https://github.com/WaDelma/hiekkapeli
- https://github.com/menuan/lack
## UI
- https://github.com/hecrj/iced
- https://github.com/dhardy/kas
- https://www.reddit.com/r/rust/comments/ebvp4i/kas_gui/
- https://github.com/redox-os/orbtk
- bindings for Nuklear (using old `wgpu = "~0.3"`) https://github.com/snuk182/nuklear-backend-wgpurs
## Rendering
- some parts of rendy used by wgpu-rs https://github.com/rust-tutorials/learn-rendy
- svg https://github.com/nical/lyon
- https://github.com/mikialex/rendiation
- text https://github.com/hecrj/wgpu_glyph
- render bitmap fonts without jagged edges even at high magnifications https://github.com/grenlight/sdf-text-view
- terminal https://github.com/stevebob/prototty
- physically-based renderer https://github.com/mad-s/hijiki
## About Rendy
About Rendy and wgpu https://community.amethyst.rs/t/skepticism-about-rendy/1221/9
>wgpu uses gfx-hal and parts of rendy, totally fine on DX12 on Windows https://www.reddit.com/r/rust/comments/eh7wkx/the_state_of_ggez_2020/fcj1746/
>We hoped Amethyst team would help, but that didn't happen either. https://www.reddit.com/r/rust/comments/eh7wkx/the_state_of_ggez_2020/fcipapq/
>Switching to rendy nearly killed this project due to the time and effort required https://community.amethyst.rs/t/skepticism-about-rendy/1221/11
>This duality of APIs in gfx-hal worked to an extent. Providing safety was impossible without imposing some restrictions or overhead. In the command pool example, its only safe to re-use a command buffer if its done execution on the GPU, and the user doesnt intent to use it. We cant possibly know this in gfx-hal without introducing overhead… So, at the end of the day, we decided that the “typed” (user-facing) layer is still useful, it doesnt have to be a part of gfx-hal. Thus, we removed it, recommending rendy-command as a replacement. This slimmed up gfx-hal API surface and allowed us to straighten up the terminology (no more “RawXXX” or “XxxTyped”). https://gfx-rs.github.io/2019/10/01/update.html
## WebGPU and portability
>One of the goals of WebGPU that differentiates it from the other libraries and APIs is "strong" portability, in a sense that it not only runs on all targeted platforms, but also the performance expectations match. Therefore, if don't see a way to consistently implement a feature on at least 2 or the 3 target platforms, in such a way that it works and using it shows a difference, we don't include it in the core API. Take sub-passes, for example, that, while you can technically implement them on Metal and DX12 by doing separate passes, they only make a difference on Vulkan mobile GPUs today, so there can't be expectation that using sub-passes makes you magically faster. Take buffer capabilities as another example: if we expose all the queries about what is supported and what not, it's easy to write an application that would work on the developer platform but then break on others, because they possibly forgot to query, or simply don't have another code path in place. Finally, things like "multiple queues" are desired for the most part, but we haven't yet figured a plan on how to expose them portably, as in - without race conditions affecting the portability of user programs. https://github.com/nannou-org/nannou/issues/374#issuecomment-533841665
## Misc
- Processing-esque https://github.com/flmng0/peach
- Wave Function Collapse https://github.com/stevebob/wfc
- process images on the GPU https://github.com/danielbusaba/Rust-GPU
- LBM fluid simulation https://github.com/grenlight/fluid-webgpu
- Safe Wrapper Around the Chromium Embedded Framework https://github.com/anlumo/cef
## License
[![CC0](https://licensebuttons.net/p/zero/1.0/88x31.png)](https://creativecommons.org/publicdomain/zero/1.0/)