3 ms·
A very large part of me is annoyed that Apple didn't open source Metal before Vulkan was released. OpenGL definitely was annoying to work with, but Vulkan is i
by tombert 2y ago
A very large part of me is annoyed that Apple didn't open source Metal before Vulkan was released. OpenGL definitely was annoying to work with, but Vulkan is impossible for the average user to do anything with; drawing a spinning cube takes several hundred lines of code, which I've written and I still don't really understand!
I realize that Vulkan isn't meant for a "humans" to write, it's basically meant to be a target, and that's fine, but it annoys me that you get people on forums that say "learn Vulkan instead" when people ask for help with OpenGL.
Metal is substantially more fun to write than OpenGL or Vulkan; I haven't measured any performance stuff on it, but it certainly feels fast enough, and I've been able to do basic graphics experiments with it in way less time than I was ever able to accomplish with OpenGL or Vulkan.
Still, whether or not it annoys me that Vulkan has become the new standard, portability of the standard is important, so obviously this announcement is a godo thing.
- deleted 2y ago[deleted]
- hgs3 2y agoPlease don't misinterpret this as gate keeping, but Vulkan is designed by and for professionals (not hobbyists). It is certainly not a rapid prototyping tool. Vulkan and OpenGL aren't comparable because Vulkan isn't merely a graphics API, but rather it's a low-level GPU API. For example you can use Vulkan in place of CUDA for running highly parallelized computations on the GPU (no graphics implied).
- tombert 2y agoYeah, I know, that's why I mentioned it being a target. I realize it's meant to be used for extremely low-level stuff. Which is fine, I don't get annoyed at x86_64 assembly being difficult to write. As I said, the thing that bothers me is when people act like Vulkan is a replacement for OpenGL (presumably because they've never actually written either and they just saw some YouTube demos), and it really isn't, or at least that's an incomplete picture. It's a replacement for OpenGL in the same way writing JVM bytecode directly is a replacement for Java; they fundamentally do the same or similar things, but one is sort of categorically different in its goal. I do wish that there was a more consumer-friendly API announced in addition to Vulkan though; I'm fine with replacing OpenGL with something newer and better-fitting for newer cards, but that's not what we got. That's why I was trying to say that I was annoyed that Apple didn't open source Metal, because I feel like it really could have taken that role. Also, while I'm aware that Vulkan doesn't inherently imply "graphics", I would also like to point out that CUDA and rocM are also considerably easier to write than the Vulkan equivalents, at least in the little examples I played with, though I will acknowledge that I felt Vulkan was better than OpenCL.
- hgs3 2y ago> I would also like to point out that CUDA and rocM are also considerably easier to write than the Vulkan equivalents I agree that Vulkan has more boilerplate, but I think that's because Vulkan is an open standard and makes fewer assumptions which means the API has more ceremony. For example Vulkan might be implemented for custom embedded hardware; its design helps give the manufacturer more leeway. CUDA and ROCm were designed by Nvidia and AMD for their own hardware and so they can bake in low-level assumptions which means a more streamlined API.
- tombert 2y agoWell ROCm is more or less designed to be portable between both; that's not strictly true but it's fairly similar to CUDA so I don't know how much of that boilerplate is reduced by the fact that it's AMD specific. Your point is fair though; Vulkan kind of runs on almost-literally everything made in the last nine years or so, so it can assume basically zero about any kind of underlying OS stuff. Still, Vulkan has convinced me that I have no desire to work that low-level of GPU programming, as I had zero fun playing with it. I guess I like having one layer up of abstraction; I'm happy enough to write CUDA, and I'm happy enough to write anything higher level than that.
- garaetjjte 2y ago>I do wish that there was a more consumer-friendly API announced in addition to Vulkan though Maybe WebGPU could be that?
- flohofwoe 2y ago> but Vulkan is designed by and for professionals (not hobbyists) Vulkan is designed by committee, and that's its single biggest problem (and this was also the single biggest problem of OpenGL).
- andrewmcwatters 2y ago> Please don't misinterpret this as gate keeping, but Vulkan is designed by and for professionals (not hobbyists). It is certainly not a rapid prototyping tool. Vulkan and OpenGL aren't comparable because Vulkan isn't merely a graphics API, but rather it's a low-level GPU API. For example you can use Vulkan in place of CUDA for running highly parallelized computations on the GPU (no graphics implied). This is bullshit and it doesn't mean anything. In the days of OpenGL, you used the same initialization code regardless if you were a "professional" or a "hobbyist." Code is code. It especially doesn't mean anything because people use CUDA for CUDA, and want to use Vulkan for graphics because OpenGL has been discontinued.
- _mlbt 2y agoI wonder how feasible a Metal compatibility library wrapped around Vulkan would be? That way you could use Metal on other platforms. Also, what is the best resource for learning Metal if all you know is some OpenGL 1.x from the old “Lego” book?
- tombert 2y ago> I wonder how feasible a Metal compatibility library wrapped around Vulkan would be? Sort of an inverse of the MoltenVK project? I don't see any reason why that would be infeasible other than "no one really wants this but me". > Also, what is the best resource for learning Metal if all you know is some OpenGL 1.x from the old “Lego” book? To be clear, I am not a graphics person, I'm a dude who dicks around with graphics occasionally to play with some kind of more graphical algorithm I read about, but I really don't know what I'm talking about. That said, I went through this book, It's good enough: https://a.co/d/b3yjPMp https://a.co/d/b3yjPMp A former coworker of mine also wrote this one if you're interested in iOS game dev, though I have not read it so I cannot speak to its quality: https://a.co/d/c99oE0Q https://a.co/d/c99oE0Q
- _mlbt 2y agoThanks! I always wanted to learn Metal, but it doesn’t seem like there are many resources on it other than Apple’s website.
- tombert 2y agoI also think FNA is pretty cool as well. It’s kind of “mid level” instead of low level, more or less like a light Direct3D. I think MonoGame is supposed to be comparable but I haven’t used it.