webgpu-headers
learn-wgpu
Our great sponsors
webgpu-headers | learn-wgpu | |
---|---|---|
4 | 75 | |
317 | 1,361 | |
5.0% | - | |
7.4 | 8.0 | |
18 days ago | 12 days ago | |
C | Rust | |
BSD 3-clause "New" or "Revised" License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
webgpu-headers
-
New Vulkan Documentation Website
There's standardized C API which is both implemented by Dawn and wgpu.rs:
https://github.com/webgpu-native/webgpu-headers/blob/main/we...
...and this standardized API would also enable other independent native implementations.
There's even thought put into the API being extensible via 'struct chaining', this is how the native implementations also accept SPIRV shader bytecode instead of just WGSL shader source code.
-
I want to talk about WebGPU
The API definition exists:
https://github.com/webgpu-native/webgpu-headers/blob/main/we...
The next missing piece is a standard window system glue API for WASI though.
-
The current state of GPU API's and why I wish V-EZ hadn't died.
At first it was for only web, but browsers implement it using compiled code (C++/Rust) and you can use the implementation directly. Wgpu is for Firefox, Dawn is for Chrome. There is a C header for them: https://github.com/webgpu-native/webgpu-headers/blob/main/webgpu.h.
-
Learn Wgpu
> Wgpu actually has C bindings to allow you to write C/C++ code with it, as well as use other languages that interface with C. That being said, wgpu is written in Rust, and it has some convenient Rust bindings that don't have to jump through any hoops. On top of that, I've been enjoying writing in Rust.
Why the bloat when this exist? https://github.com/webgpu-native/webgpu-headers
learn-wgpu
-
Practicing Rust, Learning Bevy, Creating a WASM Snake Game for the Browser
Nice.
Speaking of Snake game, if you want to go even deeper, you can try to use the wgpu crate to combine Rust and WebGPU to write everything from scratch. Here is the tutorial:
https://sotrh.github.io/learn-wgpu/#what-is-wgpu
I once wrote a code editor with wgpu, from font rendering to char/line state management (very rough) for music live coding:
https://github.com/glicol/glicol-wgpu
It runs in browsers, even including Safari!
- Please review my ECS geospatial engine so far
-
Realtime Ray Marching implemented with Rust and wgpu
https://sotrh.github.io/learn-wgpu/ This is probably the best resource out there for learning wgpu specifically. If you're unfamiliar with graphics, the learnopengl one is good. If you've got experience though, jumping right into that one is a shout or looking at some vulkan ones as they're pretty similar in terms of architecture.
-
Is it possible and realistic to learn independent of an API?
- https://sotrh.github.io/learn-wgpu
-
What would be a good project structure/ design for a game engine using WebGPU?
Most of The WGPU I learnt is from https://sotrh.github.io/learn-wgpu/ but it doesn't really talk about designing n stuff, I thought of checking out the source code for Bevy or even games like veloren. But well, their codebases are pretty big to get started in the first place.
-
Trying to learn wgpu
If you haven't seen it: https://sotrh.github.io/learn-wgpu/ is a good introduction that will explain most of what you asked, then can refer to rend3d or bevys renderer to see how a render graph works.
-
WebGPU with C++ ?
I suggest looking into Rust for developing WASM applications with WebGPU, since Rust has in my experience way better support for WASM than c++. wgpu is the implementation of the WebGPU standard in rust and is very well documented. It also isn't just a backend for WebGPU but also for OpenGL, WebGL, Vulkan, Metal and DirectX, so you application can run on every device. There is a great tutorial series here.
-
What is Rust's potential in game development?
So my advice would be to try Bevy, but don't force it if it doesn't work for you. If you're interested in more "low-level" graphics programming or you have some experience in that area, then learning wgpu is another thing you can do (and if you start doing advanced things with Bevy, you will want to be familiar with wgpu anyway)
-
Wgpu Questions: Vertex Buffers
When should I create encoders and render passes? I'm following these WebGPU tutorials here, and it creates both an encoder and render pass from that encoder on a per-frame-basis. Can it be expensive to create these each frame? Should I at least cache the encoder to somewhere more persistent, so that I'm not creating a new one each frame? It looks like creating render passes need to be created each frame because they need to be dropped from their scopes in order to finish the render pass before submitting the queue.
-
Custom Intermediate buffers/textures for shaders
For context, I've got rudimentary knowledge of how to work with shaders through learnopengl.com, and https://sotrh.github.io/learn-wgpu/.
What are some alternatives?
ash - Vulkan bindings for Rust
glium - Safe OpenGL wrapper for the Rust language.
wgpu-native - Native WebGPU implementation based on wgpu-core
SDL - Simple Directmedia Layer
winit - Window handling library in pure Rust
wgsl-mode - Emacs syntax highlighting for the WebGPU Shading Language (WGSL)
egui - egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
luminance-rs - Type-safe, type-level and stateless Rust graphics framework
fltk-rs - Rust bindings for the FLTK GUI library.
rust-gpu-compute-example - Minimal example of using rust-gpu and wgpu to dispatch compute shaders written in rust.
bgfx - Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.