3 ms·
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 w
by Chabsff 3y ago
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.
- Buttons840 3y agohttps://webgpufundamentals.org/ 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.
- bobajeff 3y agoI 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.
- adrian17 3y agoNote 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.)
- slimsag 3y agoIn 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
- pjmlp 3y agoUsing WebGPU as native API, instead of a proper middleware, means only using 2015 hardware features, which I guess it is fine for casual stuff.