naga
gpuweb
Our great sponsors
naga | gpuweb | |
---|---|---|
22 | 38 | |
1,115 | 3,435 | |
2.9% | 1.7% | |
9.1 | 9.6 | |
6 days ago | 6 days ago | |
Rust | Bikeshed | |
GNU General Public License v3.0 or later | GNU General Public License v3.0 or later |
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.
naga
-
Does WGSL work well with vulkan?
There's a compiler that can translate from WGSL to SPIR-V called naga. Having such a compiler is essential, since WebGPU is planned to use WGSL and browsers are expected to implement rendering via Vulkan (and probably Metal and DX12).
You could setup your build manager to use naga-cli to compile your shaders into spir-v on write
-
Glsl transpiler, interpreter?
Not sure about on the CPU, but naga is a shading language transpiler you can write custom front/backends for.
-
How are Vulkan, CUDA, Triton and all other things connected?
For cross-platform support look at WebGPU and Vulkan (e.g,: [0] [1]. Essentially, you would need to write the func in WGSL or GLSL, HLSL or MSL. Each of these can be cross-compiled to SPIR-V (what Vulkan needs) with cross-compilers such as spirv-cross and naga.
-
How to use Push Constants in Wgsl using WGpu?
anyway, here's the test. https://github.com/gfx-rs/naga/blob/master/tests/in/push-constants.wgsl
- WebGPU – All of the cores, none of the canvas – surma.dev
-
niceshade - convert HLSL to SPIR-V, GLSL, or Metal Shading Language
You might try https://github.com/gfx-rs/naga for that
-
Announcement: pixels 0.9.0 release
Personally, one of the most exciting things about this release is that it took me on a little journey to contribute some fixes to the naga shader translator. Specifically, naga 0.8.1 now properly supports the Fused-Multiply-Add function in the HLSL (DirectX) and GLSL (WebGL2 and GLES 3.1) backends. To be frank, this function does not make a big difference on the tiny shader in pixels. It does however mean that using compute-heavy shaders with wgpu 0.12 can now benefit from this function on all supported backends!
-
I made a video with every single debug render on a pathtracer I'm programming in Rust
universal shader translation
-
Porting WebGL Shaders to WebGPU
> What guarantees do you have it won't happen again?
Apple was pretty clear about their intent not to ship WebGL2, and they did the opposite for WebGPU so it's not gonna be the same story. Of course, I can't be 100% sure that Apple won't change their mind or anything, but there is no reason to believe they'll do so.
> Even if Apple had done it on time, it was a 2012 hardware API for 2017 hardware
Most games released in 2017 had to support hardware from 2012 anyway. Even AAA games released this year support GPU released in 2012[0]! For non AAA games, targeting a 5-years old API is probably the newest you can afford. We're not talking about bringing the bleeding edge GPU tech to the web (it won't, it's never standardised anyway, like Mesh shaders you talked about). The goal is to provide modern standardized tech to developers, and it does it in a portable way, which makes it even more affordable.
> Intel had two failed attempts to bring compute into the browser.
So what ?
> Yes it is a very bad thing, when Vulkan can keep using GLSL and HLSL, while DX12 happily will use any HLSL from the API history, and Metal can use proper C++14 shaders.
Vulkan uses SPIR-V, not HSL or GLSL. Translation tooling exist, but it also exists for WGSL -> SPIR-V[1]
Each platform has its own shading language, will this one be better than the other, I don't know but I don't think it's gonna be worse either.
> WGSL is web politics as usual.
Not really. See this summary[2] from a Mozilla gfx engineer:
[0]: https://support.activision.com/black-ops-cold-war/articles/m...
[1]: https://github.com/gfx-rs/naga
[2]: https://kvark.github.io/webgpu-debate/SPIR-V.component.html
gpuweb
-
Requiem for Piet-GPU-Hal
Think of Vulkan, Metal, DirectX 12 (DX12) as different database engines. They run compute/render shaders which are incompatible dialects of each other (like Oracle SQL != Postgres SQL != MySQL). WGPU tries to be the ANSI SQL.
This an oversimplification ofc. Today most shaders compile to an intermediate form Spir-V which then targets different backends and can lead to some funny translation.
-
Where to start to develop a game engine?
If you do know Rust and know what to pick from, but want to be at bleeding edge and have the best Rust centric graphics libraries can offer, try wgpu which is an implementation of WebGPU. There's a tutorial on how to get started too.
-
Resources on WGSL clip planes?
There's an open bug about it: https://github.com/gpuweb/gpuweb/issues/390
- Is there anywhere to see a roadmap of features to be standardized on the browser?
-
zig-gamedev: audio experiments sample app (wgpu, cross-platfrom)
When reading "wgpu", I wondered if it used the WebGPU implementation of the same name (wgpu) rather than Dawn. It may be worth changing mentions of "wgpu" to "WebGPU" in zgpu (and these titles) similar to how its dependency, mach-gpu-dawn, uses these names,
-
Release of wgpu v0.13 and Call for Testing
Yup! See https://github.com/gpuweb/gpuweb/pull/2562 and linked issues for more context on that one.
-
State of GPGPU in 2022
Wgpu has performance close to Vulkan in some cases, but still no compute performance benchmarks. Just curios, why wgpu couldn't just make extension to use advanced atomics, multiple queues or other high-performance feature in hardware that supports it? One of Vulkan and wgpu goals are to make it highly customizable through extensions. edit: actually already there is wgpu extension that supports (subgroup operations)[https://github.com/gpuweb/gpuweb/pull/1459]
-
Mapr: Native cross platform maps in Rust
It is xkcd though.
WebGPU as proposed by Ape was basically Metal. Naturally other vendors weren't keen on implementing this, so they arrived at a compromise which is a bastard child of Metal and Vulkan.
They couldn't even adopt an existing shader language and invented a new one. That goes as far as invent new and unprecedented language constructs https://github.com/gpuweb/gpuweb/issues/569
-
What image formats do you support?
https://github.com/gpuweb/gpuweb/issues/386 It looks like mipmap generation is coming eventually. In that thread they mention people are using webgl to generate mipmaps and then just sending those into webgpu
-
How to use Push Constants in Wgsl using WGpu?
The documentation is lacking some information of how to implement or rather use push constants. The closest I could find is this here: https://docs.rs/wgpu/latest/wgpu/struct.RenderPass.html#method.set_push_constants As well as the part that got removed from the Wgsl language: https://github.com/gpuweb/gpuweb/pull/615/files
What are some alternatives?
wgsl.vim - WGSL syntax highlight for vim
wgsl-cheat-sheet - Cheat sheet for WGSL syntax for developers coming from GLSL.
BestBuy-GPU-Bot - BestBuy Bot is an Add to cart and Auto Checkout Bot. This auto buying bot can search the item repeatedly on the ITEM page using one keyword. Once the desired item is available it can add to cart and checkout very fast. This auto purchasing BestBuy Bot can work on Firefox Browser so it can run in all Operating Systems. It can run for multiple items simultaneously.
wgpu-rs - Rust bindings to wgpu native library
shaderc - A collection of tools, libraries, and tests for Vulkan shader compilation.
noclip.website - A digital museum of video game levels
wgsl-mode - Emacs syntax highlighting for the WebGPU Shading Language (WGSL)
pyodide - Pyodide is a Python distribution for the browser and Node.js based on WebAssembly
webgpu-wgsl-hello-triangle - An example of how to render a triangle with WebGPU using WebGPU Shading Language - the "Hello world!" of computer graphics.
SPIRV-Cross - SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages.