4 ms·
wgpu is a nice implementation of webgpu for native rust applications on desktop.
by adastra22 3y ago
wgpu is a nice implementation of webgpu for native rust applications on desktop.
- pjmlp 3y agoI don't see a point of that versus middleware engines, with much better tooling. WebGPU/WebGL are like JavaScript, something that we have to put up with, because on the browser there is no other alternative. No need to constrain ourselves to the browser limitations when there are other options.
- FL33TW00D 3y agoA single code base for both native & web? Not having to write Javascript on the web?
- pjmlp 3y agoOnly if you enjoy coding to 2015 hardware specifications in 2024, leaving the rest of the hardware out.
- adastra22 3y agoI think you are confusing WebGPU with WebGL? WebGPU standard process only started in 2021, and is still undergoing revisions.
- mschuetz 3y agoOP is right. WebGPU is targeted towards the lowest common denominator, which is fairly old mobile phones. It therefore doesn't support modern features and is basically an outdated graphics API by design.
- adastra22 3y agoCare to give an example? From my viewpoint as a WebGPU user, we consistently get access to new GPU features with every refresh. E.g: https://developer.chrome.com/blog/webgpu-io2023 https://developer.chrome.com/blog/webgpu-io2023 You just have to set limits correctly when you initialize a GPU instance in order to have access to the new features.
- pjmlp 3y agoMesh shaders, raytracing, DirectStorage, GPU work graphs, C++ features on shading languages, some of the post 2015 features that aren't coming to WebGPU any time soon.
- adastra22 3y agoThe features you mention are mostly applications of compute shaders, which are fully capable of being written in WebGPU, as WebGPU supports buffer -> buffer compute shaders when the underlying GPU supports it. I've personally implemented mesh shaders in my own project, and there are plenty of examples of WebGPU real time raytracers out there. DirectStorage I had to google and it looks like a Windows DMA framework for loading assets directly to GPU ram? That's not even in scope for WebGPU, and would be handled by platform libraries. Linux has supported it for ages. Seriously I get the impression from your posts that really don't have any experience with WebGPU at all, and are basing your understanding off of misinformation circulating in other communities. Especially with your continued nonsensical statements about not supporting "post-2015 features." 2015-era chipsets are a minimum supported feature set, not a maximum. Please just take the L and read up to inform yourself about WebGPU before criticizing it more.
- pjmlp 3y agoI bet those implementation of yours weren't done in WebGPU actually running on the browser, otherwise I would greatly appreciate being corrected with an URL. DirectStorage started as a Windows feature, is actually quite common in game consoles, and there is ongoing work to expose similar functionality in Vulkan. Yes, I do have WebGPU experience and have already contributed to BabylonJS a couple of times. Maybe I do actually know one or two things about graphics APIs.
- jrmydev 3y agoExactly this, along with a lot of the "smoothing-out" done by the webgpu spec which provides a clear and open abstraction target.
- pjmlp 3y agoMinimum common set of features from 2015 hardware.
- sroussey 3y agoI dunno, writing GPU code that works across Mac/Win/Lin/iOS/droid isn’t easy to deploy.
- adastra22 3y agoDon’t be fooled by “web” in the name. Just like WebAssembly is/will be a better JVM, WebGPU is already posed to be a better OpenGL/Vulkan. It is a full graphics API unconstrained by browser implementations, and available without a browser runtime.
- pjmlp 3y agoIt isn't WebGPU any longer if it is incompatible with browsers.
- fayalalebrun 3y agoI am curious, in what ways is WebGPU better than Vulkan or Metal? From my point of view, WebGPU going back to an interpreted shading language like OpenGL makes it conceptually closer to JavaScript than WebAssembly.
- mschuetz 3y agoI gave up on Vulkan simply because it's too overengineered and cumbersome. WebGPU, on the other hand, is relatively easy to use, even though it is build on many of the same concepts.
- blarg1 3y agoVulkan is too hard and metal is only for mac.
- adastra22 3y agoHLSL has in practice become the shader language for Vulkan, and Metal has always had a high-level shading language. The GPU market is simply too heterogeneous for a low-level ISA like SPIR-V to be applicable and performant across all architectures. A modern GPU driver effectively has to "decompile" SPIR-V binaries, then recompile it to the actual vendor-specific architecture used on the installed GPU, and perform both high-level and low-level optimizations. Standardizing on a single high level shading language, but one purposefully designed to be cross-platform, is actually the simpler architecture here.
- tlb 3y ago