• Stars
    star
    334
  • Rank 126,264 (Top 3 %)
  • Language
  • Created almost 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A curated list of wgpu code and resources.

Awesome wgpu

A curated list of wgpu code and resources.

PRs welcome.

About wgpu

Ecosystem

  1. individual API libraries like ash, d3d12-rs, metal-rs - for the lowest hard-core level available to Rust
  2. gfx-hal for lowest portable level
  3. Rendy for helping to solve the rough corners of gfx-hal
  4. wgpu-rs for the lowest safe level
  5. Engines like ggez or Amethyst for the highest level

https://www.reddit.com/r/rust_gamedev/comments/bv7w2f/wgpurs_now_uses_rendy_to_manage_memory_and/

Learn

Gamedev

Rust gamedev

General gamedev

Physics/Collision

Games

Applications

Examples

Older

UI

Rendering

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, it’s only safe to re-use a command buffer if it’s done execution on the GPU, and the user doesn’t intent to use it. We can’t 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 doesn’t 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. nannou-org/nannou#374 (comment)

Misc

Shading Language

GLSL

Found the problem - I need to become a GLSL shader expert https://www.reddit.com/r/rust_gamedev/comments/be08e2/wgpu_pipeline_question/el40lsl/

HLSL

Google and Samsung are developing HLSL compiler for Vulkan, because a large majority of game studios don't want to bother with Vulkan on Android if they cannot port their shaders. https://news.ycombinator.com/item?id=18439910

GLSL vs HLSL

My biggest concerns about using HLSL as the source are:

WSL (formerly WHLSL)

There are many Web developers using GLSL today in WebGL, so a potential browser accepting a different high level language, like HLSL, wouldn’t suit their needs well. In addition, a high-level language such as HLSL can’t be executed faithfully on every platform and graphics API that WebGPU is designed to execute on. https://webkit.org/blog/9528/webgpu-and-wsl-in-safari/

So, we decided to make the language more simple, low-level, and fast to compile, and renamed the language to Web Shading Language to match this pursuit.

CG

CG has been discontinued, and is no longer supported or actively worked on by Nvidia. Nvidia recommends that all users switch to a combination of GLSL and HLSL, or a newer library such as nvFX (on github). This is because it was too difficult to maintain feature-compatibility between GLSL and HLSL. https://gamedev.stackexchange.com/questions/4234/what-are-the-pros-and-cons-of-hlsl-vs-glsl-vs-cg/4333#4333

OpenGL

License

CC0

More Repositories

1

awesome-elm-gamedev

A curated list of useful Elm tutorials, libraries and software for Game Development. Inspired by awesome list. Feel free to contribute.
164
star
2

elm-games

All Elm Games (hopefully)
137
star
3

elm-ui-cookbook

126
star
4

goshop

Shopping cart in Go
Go
101
star
5

react-starter-kit

React starter kit - no need for grunt/gulp/gloop/glugle/gleffy/gloran/whatever task runner comes out next week
JavaScript
40
star
6

oceanic-next-jetbrains-theme

Oceanic Next Theme (UI) for JetBrains
25
star
7

elm-navigation-example

elm-lang/navigation example without using hashes
JavaScript
15
star
8

nix-for-javascript-developers

Nix language for Javascript developers
11
star
9

react-dropzone-progress-bar

react-dropzone with progress bar
JavaScript
11
star
10

dotfiles

Emacs Lisp
9
star
11

exherbo

Shell
9
star
12

stmux

stmux is a script to create tmux session with name taken from current directory and config file .tmux_session
Shell
7
star
13

color-gradient-algorithm

Python
5
star
14

monokai-ocean

A dark theme for Visual Studio Code - Monokai + Ocean background
5
star
15

zig-postgres-template

Zig
4
star
16

rust-juniper-example

Rust
4
star
17

elm-packages-stats

Show graph of number of elm packages
HTML
3
star
18

rust-shopping-bot

Rust
3
star
19

gplafferoshop

internet shop on gpl affero 3 licence
PHP
2
star
20

elm-code-editor

Elm code editor - embeddable
Elm
2
star
21

nixos-config

Nix
2
star
22

elm-image-slider

Elm
2
star
23

rust-hackerrank

http://hackerrank.com solutions
Rust
2
star
24

awesome-zig

2
star
25

guixsd-config

Scheme
2
star
26

rustommerce

Rust
2
star
27

scrape

Showcase what can be done in vanilla.js
JavaScript
2
star
28

zig-utils

A collection of utility scripts and tools I use for zig development
Shell
2
star
29

sortbytime

Rust
1
star
30

actix-web-juniper-trying

Rust
1
star
31

terminal-text-animation

JavaScript
1
star
32

calibre-library

1
star
33

go-koans-solution

my progress in https://github.com/cdarwin/go-koans
Go
1
star
34

java-scraping-jaunt

Java
1
star
35

elm-math-kids

Elm
1
star
36

rust-json-pretty-format

Rust
1
star
37

elm-input-live-search

Elm
1
star
38

angular_tree

in java
Java
1
star
39

flexbox-wrap-border-collapse

HTML
1
star
40

luna

Go
1
star
41

rust-regex-stdin-by-line-benchmark

Rust
1
star
42

rust-projecteuler

Rust
1
star
43

angular-input-time-chrome

JavaScript
1
star
44

angular-checkbox-tree

JavaScript
1
star
45

elm-elm-mdl-ripple-slow

Elm
1
star
46

angularjs-tree

JavaScript
1
star
47

.configs

Vim Script
1
star
48

miglayout

Automatically exported from code.google.com/p/miglayout
Java
1
star
49

ajv-regexp-errormessage-example

JavaScript
1
star
50

javascript-wtf-koans

1
star
51

elm-process-sleep-example

Elm
1
star