7 ms·
While scrolling fast through the long document, my eyes immediately focused on "Wait, why not Vulkan or DirectX12?" :-D tl;dr "At the end of the day, the use c
by ognyankulev 9y ago
While scrolling fast through the long document, my eyes immediately focused on "Wait, why not Vulkan or DirectX12?" :-D
tl;dr "At the end of the day, the use case where Vulkan and DirectX12 make the most sense is when you have hundreds of thousands of objects, which are all different (different geometry, textures, etc.), and which move. This is a difficult use case to achieve, even willingly."
- wlesieutre 9y agoThe paragraph above that is relevant as well. Vulkan is only on Linux and Windows, DX12 is on Windows, Metal is on Mac and iOS. They'd have to have multiple renderers written for different APIs to cover all the platforms that they support.
- slezyr 9y ago> Vulkan is only on Linux and Windows And android. I.e. everything but Mac OS, iOS.
- EddieRingle 9y agoPlus you can get Vulkan on macOS with MoltenVK.
- wlesieutre 9y agoI've seen that before, and while it's technically true it's also 100% useless for an open source engine.
- microcolonel 9y agoIt may be open sourced in the future, there are stakeholders who might be willing to pay for this to happen (Google, for example, might want it for their iOS and Apple deployments).
- earenndil 9y agoEh, google doesn't really need it. They don't make anything that requires high performance and cross-platform, they don't make games, and chrome is only for android so they don't need to be able to run it on ios.
- microcolonel 9y agoChrome runs on OS X, where GL is deteriorating; they also have Maps and Earth on iOS.
- pjmlp 9y agoOn Android it is optional for 7+ devices, currently about 13% of market share. It is not available on Sony and Microsoft consoles, UWP apps. On the Nintendo Switch there is NVAPI, which provides even more low level control.
- pjmlp 9y agoOn Windows Vulkan is only available to desktop apps.
- phire 9y agoThe one problem with that plan, is apple have mostly stopped improving their OpenGL driver in favor of Metal.
- microcolonel 9y agoYeah, this really gets my goat. These days MoltenGL and MoltenVK are getting more popular. Good on the Molten* folks for making these layers, but I have a feeling they won't be used very widely unless they're basically free to license. Maybe somebody (Google?) will come around and buy them outright. Even worse, Apple's GL drivers never performed very well to begin with. Their intel drivers have been much slower than Mesa for more than half a decade, and supported fewer (super useful) extensions for about two years.
- kvark 9y agoMolten folks would be happy to be open sourced as long as a sufficient gratification bonus is included. Also, Vulkan Portability initiative is relevant here - https://www.khronos.org/blog/khronos-announces-the-vulkan-portability-initiative https://www.khronos.org/blog/khronos-announces-the-vulkan-po...
- pjmlp 9y agoAll major engines already support Metal, or are in the process of finalizing it. Middleware makes the actual APIs kind of irrelevant. Also there is no OpenGL or Vulkan on majority of game consoles. Even on Switch, Nintendo still has their own API with much more lowere level control than Vulkan, just in case.
- kevingadd 9y agoThis is simply not true. To begin with, the shader languages and bytecode formats are different across OpenGL and Direct3D. Consoles tend to have their own shader pipeline as well. Even if you have great abstractions in your middleware, the capabilities actually provided by the system differ, and you have to consider this. APIs and drivers remain extremely relevant, middleware or not. FWIW the PS3 (among others) actually offered OpenGL, not that you'd want to use it (the implementation was pretty bad - Apple-quality). You can also theoretically run OpenGL code on the PS4 or XBox One if you want to, since they use well-understood AMD GPUs. Fail0verflow has already booted real OpenGL on hacked PS4s (via Mesa, I believe). You can also run OpenGL on some platforms by using ANGLE to emulate specific versions of OpenGL on top of other APIs. So, ultimately the "there is no OpenGL or Vulkan" observation isn't that meaningful - if your codebase is built around OpenGL, that's not necessarily a problem at all. I don't know if I'd bother, but I'd also put money on it being possible to run ANGLE or Mesa GL on top of the PS4 graphics stack (I'm familiar with it).
- floatboth 9y ago> Vulkan is only on Linux and Windows Also on FreeBSD :) https://github.com/myfreeweb/freebsd-ports-dank#mesa-with-vulkan https://github.com/myfreeweb/freebsd-ports-dank#mesa-with-vu...
- mattnewport 9y agoIt's not necessarily the wrong choice for their use case but this explanation is a little misleading. Vulkan and DirectX 12 were designed to reduce the overhead of draw calls and to enable multithreaded dispatch. That makes it feasible to render more objects with more state changes but the efficiency benefits still apply (in theory) when rendering fewer objects, particularly on a multi core CPU. Wasting less CPU on rendering API overhead is always a good thing - if you don't use the efficiency gains to render more stuff you can use the spare CPU for something else like better physics. Both APIs are harder to use however and it's quite possible to end up less efficient than older APIs by using them badly plus current implementations can be poor, especially on mobile, so there are still good reasons not to use them.
- deleted 9y ago[deleted]
- microcolonel 9y ago> While scrolling fast through the long document, my eyes immediately focused on "Wait, why not Vulkan or DirectX12?" :-D Well, I don't think it's architected in any way that would prevent the adoption of lower level APIs; but Godot's main markets are mobile, embedded, and web where OpenGL ES 3.0 is a low (but not the lowest) common denominator.
- cma 9y agoVulkan should help with mobile battery life though.
- kevingadd 9y agoThis is a false assumption. Existing GL drivers do a lot of hard work to compensate for platform-specific (or even chip-specific) quirks and limitations. If you're building on top of Vulkan or D3D12 you potentially don't get that assistance (due to the lower-level nature of the API), and you'll have to deal with a lot of that nonsense yourself. Android apps like Firefox or Dolphin already have a bunch of one-off workarounds for shader compiler bugs, etc. It's worse without a smart driver. On the other hand, the SPIR-V system used for shaders in Vulkan routes around a significant portion of bad shader compilers, so that's nice :) If you have a Vulkan app that's not tuned for your specific device, your battery life (and framerates) could easily end up worse. Vulkan and D3D12 shine in the hands of a company like EA or Ubisoft, and it's no coincidence that the Mantle spec (a precursor to Vulkan and D3D12) was basically completely designed by DICE, the developers of EA's Frostbite engine.
- microcolonel 9y ago> This is a false assumption. Existing GL drivers do a lot of hard work to compensate for platform-specific (or even chip-specific) quirks and limitations. While it may be possible for GL stacks to do this, real mobile and embedded GL stacks tend to barely function at all. I highly doubt they do much more than try to extract maximum straight line performance for synthetic benchmarks within their budget. The reason Vulkan can have an outsize effect on power consumption is that it can allow renderer work to be spread across several threads. Running two cores at 60% the clock rate will typically cost considerably less power than running one at a higher frequency. This is an explicit (and accomplished) goal of mobile vendors in supporting Vulkan.
- kvark 9y agoSame here. While I do see a place for previous-gen graphics engines out there for the nearest time being, the provided justification does not sound too convincing. Vulkan/DX12/Metal make more sense in many ways, not just to draw thousands of different objects. For one, they allow explicit control on the memory transfers and synchronization, which leads to less performance hitches and and spikes, more predictable and stable framerate.
- planteen 9y agoWhat's not convincing about their argument about Vulkan not being supported on mobile? In my experience with embedded systems, that is true. They even discuss working with OGLES2 where OGLES3 is unavailable. Even within OGLES3, I have seen a mix of 3.0, 3.1, and very rarely 3.2 support. "Added to that fact, Vulkan still has years to go until it's properly supported in most desktop and mobile platforms, which makes it unattractive to implement for us (as it means considerably more effort to write, debug and maintain). As for DirectX12, it's only relevant for Windows/UWP, so there is no strong incentive for us to support it as a cross-platform engine."
- kvark 9y agoSure, it's not that much available on mobile, but where it is - the benefits of a next-gen API are greater than on desktop (since you have more weaker CPU cores and stricter latency requirements). I'm not arguing to drop OGLES, not at all. DirectX12 is also relevant on XB1, where you get not many other alternatives. Would be nice to see Godot titles running on consoles, eventually.
- Mikeb85 9y agoYup. By using only OpenGLES 3.0 and equivalent OpenGL, they achieve maximum compatibility while having nice enough visuals as well as good enough performance. Pragmatic decision, no point trying to compete with Unreal Engine in the visual department. That being said, people are achieving some really nice visuals in Godot 3.0 using the PBR shader and new renderer...