News for hackers. Stuff that matters.
Re:New Vulkan Documentation Website by Chabsff on Wednesday October 11, 2023 @09:57AM (#37844465)
Seconding the first recommendation. WebGPU is currently the sweet spot between classic and modern approaches.

Also, don't be fooled by the name. While WebGPU was designed for the web browser, there are already some solid native implementations (wgpu and Dawn), and can definitely fill in the same role as Vulkan/DX12/Metal for most casual usages.

Re:New Vulkan Documentation Website by Buttons840 on Wednesday October 11, 2023 @10:14AM (#37844679)
https://webgpufundamentals.org/ is the best learning material I've found. I've been learning Rust's WGPU and I appreciate that the tutorial uses a different language and a slightly different API[0], it keeps me thinking instead of just copy/pasting.

I never learned OpenGL, but think I will have to eventually refer to some OpenGL material, because there's no WebGPU material except the spec and like 3 incomplete tutorials.

[0]: WebGPU is a JavaScript API, so Rust cannot implement it exactly, but it's very close.

Re:New Vulkan Documentation Website by bobajeff on Wednesday October 11, 2023 @11:04AM (#37845367)
I also used webgpufundamentals.org to learn webgpu native. Only for me I was porting the examples to C. (I also used WGPU as the backend as I find it easier to debug than Dawn.)

I agree it keeps you thinking about how to do things as opposed to just copy pasting. It also helps that the examples are small and in JavaScript so it's easier to figure out the logic that need for them to work.

Re:New Vulkan Documentation Website by adrian17 on Wednesday October 11, 2023 @10:42AM (#37845046)
Note that wgpu, while mostly mirroring WebGPU (and being used to implement WebGPU in Firefox), doesn't have an identical API; WebGPU being the lowest common denominator* of the underlying low-level APIs, while wgpu offering some minor platform-dependent features on top of that. For exaple wgpu's PrimitiveState has an additional polygon_mode field (that can be used to easily draw wireframes) that doesn't have a WebGPU equivalent.

(* meaning, while simplified, it's also missing some convenience features sprinkled in the lower-level APIs. For example, from what I've seen, pipeline explosion is much harder to deal with here.)

Re:New Vulkan Documentation Website by slimsag on Wednesday October 11, 2023 @12:48PM (#37846880)
In some cases wgpu has extensions that fundamentally change usage (e.g. bindless) which aren't supported in browsers at all, right? i.e. wgpu natively and WebGPU in a browser are really just two different topics entirely
Re:New Vulkan Documentation Website by pjmlp on Thursday October 12, 2023 @03:27AM (#37854421)
Using WebGPU as native API, instead of a proper middleware, means only using 2015 hardware features, which I guess it is fine for casual stuff.