3 ms·
One of the hopes of Vulkan on Godot is a higher performance API on mobile. Apple is a sticky company to develop for and it isn't practical to have direct suppo
by willis936 7y ago
One of the hopes of Vulkan on Godot is a higher performance API on mobile. Apple is a sticky company to develop for and it isn't practical to have direct support for metal, but moltenVK might allow for vulkan based games to run on it. If this abstraction really is possible then vulkan seems to be an excellent choice for supporting multiple platforms. I'm nervous about it happening until I actually see it happen. There is also not very much discussion on this front, even though it must affect many people trying to make games for mobile.
- Razengan 7y ago> Apple is a sticky company to develop for and it isn't practical to have direct support for metal Why is it not practical to have direct support for Metal? Honest question. You get access to a market of over a billion devices across desktop, phone, tablet and TV, with iPhones and iPads having some of the best graphics performance in their class. Even more important for developers, Apple platforms generally have a much higher percentage of users on their latest OS versions than Android etc. Why wouldn't you want to get the most out of that by using their native API? You can get pretty far just by adopting SpriteKit/SceneKit which use Metal under the hood. 3D is outside my ken so I haven't measured the performance for that, but for 2D even my sloppy pet project [0] could update 3000+ sprites every frame at 60 FPS on the 2 year old iPhone X. You can even mix in SwiftUI without affecting game performance! (that I can tell so far.) [0] https://github.com/InvadingOctopus/octopuskit https://github.com/InvadingOctopus/octopuskit
- willis936 7y agoThis is not a question for me. It's a godot decision. They seem to know what they're doing and have claimed that platforms that use metal are "not used very much". https://godotengine.org/article/abandoning-gles3-vulkan-and-gles2 https://godotengine.org/article/abandoning-gles3-vulkan-and-...
- Razengan 7y agoThey talk about macOS, "a platform not used very much" (despite there being over a 100 million users the last time someone counted), not "[all] platforms that use Metal" which also includes iOS/iPadOS and tvOS. > Still, the lack of support on macOS made it unappealing. Having to write a Metal backend to support this OS is a lot of effort for a platform not used very much. It seems with MoltenVK, Vulkan would use Metal anyway? > MOLTENVK GOES OPEN SOURCE > However, today, in a completely unexpected turn of events, it seems Valve has found an arrangement with the developers of MoltenVK (the commercial and proprietary Vulkan over Metal wrapper), ported Dota 2 to it, and got it open sourced. > It seems to be a mostly complete Vulkan implementation that runs on macOS and iOS. This pretty much lifts the only barrier we had for moving Godot to it.
- willis936 7y agoYes and that is the last they’ve said about metal support. Mixed signals about its importance. It’s unclear how important it is to the godot development team and if it isn’t important it might simply not happen.
- gravypod 7y agoThis is a case where adding one feature adds a 2x scaling factor to your test plans. Add a game effect? Now you need to test it in Vulkan and Metal which means two test computers, twice as long to run a test, etc. It's just a logistical nightmare. It makes even less sense when there are shims like molten which will translate for you. No need to run all of your test plans through their shim. Just a subset will do since they're likely testing their code.
- rstupek 7y agoHave you really eliminated testing because you use the shim? Realistically in my experience you really haven't
- gravypod 7y agoYou haven't eliminated it but it doesn't scale your workload the same. You'd likely be fine with having a tester play through your game on molten. In any event it is still much less code and testing than supporting multiple backend APIs.
- opencl 7y agoIt's not practical to have direct support for Metal because nobody who wants it is volunteering to write and maintain a new backend for it. Godot is a project with limited resources and the Vulkan backend works fine on Apple platforms through MoltenVK, so as far as the people doing the work are concerned there's little point in adding Metal support and lots of other things are higher priority.
- Razengan 7y agoFair enough regarding Godot. I read the GP comment as being a general remark about Metal, so I was curious why it would be seen as undesirable.
- WAHa_06x36 7y agoIt's not quite there yet, but WebGPU will soon be a very good option for doing cross-platform 3D work. Using the native implementations you can run modern GPU code on Vulkan, Metal or D3D12.
- skohan 7y agoVulkan is already a very good solution for cross-platform graphics. It's possible to target Windows, Linux and Mac using Vulkan. WebGPU is interesting, but I doubt that it will ever be able to compete with native graphics API's on pure performance because of the security considerations it has to take into account. I'm glad we will have a more capable alternative to WebGL, but it would be a shame if computer graphics were limited by the limitations of web.
- WAHa_06x36 7y agoThe native implementation are generally planned to have options to turn off the more expensive security functionality. WebGPU is also a much more ergonomic API than Vulkan. And as far as I know, there is no Vulkan-to-D3D layer, so you are relying on your graphics card manufacturer to supply a good enough implementation, which has not worked out great in the past.
- skohan 7y ago> WebGPU is also a much more ergonomic API than Vulkan. I really doubt that a JS/Typescript API is going to be better for graphics work than a C++ API. Game developers need every bit of performance available. They're not going to want to embed web technologies and the overhead which comes with them in their native apps.
- WAHa_06x36 7y agoIt has C API for wasm and for native use of the implementations. It is designed to be performant, if not as extremely so as Vulkan.
- pjmlp 7y agoBecause professional game developers prefer to use native APIs for the ultimate performance on each target hardware. The actual 3D API is a tiny part of the whole game engine, so every professional game engine has pluggable backends anyway. So while it isn't practical for Godot, all major commercial engines like Unreal and Unity do support Metal. Also in spite of Switch being the only console with Vulkan support, around 50% of the titles are done in Unity using the NVN API. Also Vulkan keeps collecting extensions, slowly it won't be any different from OpenGL with multiple code paths for OEM, graphics card model, depending on which features one is trying to take advantage of.
- skohan 7y ago> Also Vulkan keeps collecting extensions, slowly it won't be any different from OpenGL with multiple code paths for OEM, graphics card model, depending on which features one is trying to take advantage of. API-level fragmentation is an inevitability as long as GPU vendors ship hardware with different feature sets. It might be harder for graphics programmers, but I suspect consumers don't want to live in a world where graphics advance at the pace of the lowest-common-denomenator hardware. Still Vulkan takes a much more sensible approach to extensions than OpenGL, and it's far and away easier to avoid unpredictable results on Vulkan than OpenGL. I think long-term it would make sense for Godot to support Metal, but if they are supporting Vulkan anyway, it would seem almost silly not to support Apple platforms almost for free using MoltenVK in the short term.