4 ms·
If I'm already familiar with Rust, how is WebGPU as an introduction to graphics programming if you aren't already familiar with any of the backends that it wrap
by dataangel 5y ago
If I'm already familiar with Rust, how is WebGPU as an introduction to graphics programming if you aren't already familiar with any of the backends that it wraps? Should I try just learning Vulcan first? Is the abstraction layer just going to introduce additional confusion for a newbie?
- hutzlibu 5y ago"Is the abstraction layer just going to introduce additional confusion for a newbie?" As a newbie you probably don't want to deal with WebGPU directly, but rather use (wait for) a framework, that takes care of the details.
- rektide 5y agodepends on your objective, doesnt it? if you eant to learn how things work & what the fundamnetals are, im not sure that a big engine or framework "taking care of the details" is going to be as illuminating. also, from the article, some poditive reinforcement about trying WebGPU: > I got my feet wet and found that I didn’t find WebGPU significantly more boilerplate-y than WebGL, but actually to be an API I am much more comfortable with. sometimes, there aint nothing like going to the source, finding out for yourself. is it the fastest way to get a job done? perhaps not. but the school of lifelong learning & struggles has it's upsides, can be a path towards a deeper mastery.
- hutzlibu 5y ago"depends on your objective, doesnt it? " Sure, thats why I said "probably". Anyone who wants the most performance and raw power needs to get to the source. But most people using WebGPU are probably fine with a framework, that hides all the details. Like threejs did for webGL.
- qbasic_forever 5y agoExactly. It's going to be much more productive for someone totally new to 3D graphics to play with three.js and learn all about models, meshes, textures, shaders, coordinate spaces, cameras, etc. If you're starting with webgpu or even webgl you're going to get mired in eccentricities of buffer management, byte formats, etc. which are important plumbing but just that--plumbing.
- raphlinus 5y agoI think one of WebGPU's greatest strengths is learning, as you can get started pretty easily, and you actually learn a modern approach to GPU. Vulkan requires a significant amount of boilerplate just to establish a connection to the GPU and set up basic resources like the ability to allocate buffers. In WebGPU, the latter is one or two lines of code. That said, there are some really nice learning resources for Vulkan as well, so if you're motivated and determined, it's also not a bad way to learn modern GPU.
- skohan 5y agoIs WebGPU ready? It's been a bit, but last time I looked it was pretty unstable and not well supported.
- zamadatix 5y agoIt's still in origin trials on Chrome and behind flags in Firefox and Safari. That said it's pretty stable at this point, for reference Chrome plans on enabling it for all sites and users by default towards the end of May.
- danielvaughn 5y agoSo I just went through this process and I have to slightly disagree. I'm coming from literally no knowledge of low-level graphics programming. My most relevant experience is writing against Canvas2D, which is not relevant at all. I first tried WebGPU, and was so overwhelmed with detail that it was nearly impossible to connect the dots. So I went back and decided to learn WebGL first. I know that it's very different, but the whole state machine thing makes it so much easier to understand, at a conceptual level, what you're trying to do. It didn't even take that long, just a couple of weekends and I was already familiar with the basics. I'm not going to waste time trying to become super proficient, but it gives me enough context to go back and try WebGPU again.
- chompychop 5y agoCould you share what resources you used to learn the essentials of WebGL enough to tackle WebGPU?
- jms55 5y agoStart with WebGPU. There's a great resource here: https://sotrh.github.io/learn-wgpu/ https://sotrh.github.io/learn-wgpu/.
- whatever_dude 5y agoUnless you live in windows ONLY, start with wgpu (a Rust library that supports WebGPU). It'll work with Metal/Vulkan/Web. WebGPU is very similar to Vulkan, near a 1:1 in concepts. A lot of the new libraries (Metal, DirectX) are similar in fact, so learning WebGPU will get you extremely prepared for any of those.
- ______-_-______ 5y agoI don't see why you wouldn't also use wgpu on Windows