Hacker News new | ask | show | jobs
by slabity 945 days ago
> Vulkan basically isn't relevant anymore unless you are doing Android.

Why do you say this?

3 comments

I’m not the person you asked but my 2c (since I agree with their point on Vulkan)

Very few video games are made with Vulkan. DirectX is the primary API.

Android is the only place where Vulkan really has an interesting market share.

For a beginner, it has an incredibly steep learning curve vs DirectX as well. So given the low usage and high friction to pick it up, you have a really poor ROI.

DirectX and Metal are much more conducive to getting results quickly and efficiently.

> For a beginner, it has an incredibly steep learning curve vs DirectX as well.

That's only because you refer to DirectX as a whole which includes plenty of older and APIs. If you want to start with those you can just as well start with OpenGL. if you want to jump straight into D3D 12 then that's not much differrent from Vulkan.

The topic was why not Vulkan for a beginner, and D3D12 is a lot less work than Vulkan to get the same results.

And I’d still recommend D3D11 over OpenGL for a beginner unless they really need multi platform. There are better resources, and less setup work up front.

Honestly though, if I was recommending any graphics api to start, it would be Metal. It has the best mix of ease of use to modern low overhead api.

>The topic was why not Vulkan for a beginner, and D3D12 is a lot less work than Vulkan to get the same results.

It really isn't. It's OpenGL vs D3D11 all over again. They have similar amount of complexities, comparing them for the sake of learning isn't too productive.

With that said: Vulkan has a few but very excellent tutorials while D3D12 is a lot more "read the docs or consult your local graphics guru". I'd say for self-learners Vulkan is simpler to pick up just because of resrouces.

>Honestly though, if I was recommending any graphics api to start, it would be Metal.

Yeah, I've heard metal is nice. Shame it isn't really an option for me.

IDK, all the games I try to run on Linux seem to work better in Windows/DX emulation rather than native/Vulkan.
I'm not the parent commenter, but I'd like to explain their logic, which has at least a modicum of reason to it.

About 99% of desktop video games (by far the largest clients of graphics APIs) target Windows, and therefore target either Direct3D 11 or Direct3D 12. This includes free-to-use game engines including CryEngine, Unity, Unreal, and Ren'Py. Almost all the famous, proprietary, high-performance game engines (id Tech, Frostbite, Slipspace, REDEngine, Source) target D3D exclusively. Vulkan is clearly a second-class citizen on Windows. Some engines target OpenGL, and they tend to be used in (hurriedly dashed-out) console ports, but in almost all cases they exhibit worse performance than their D3D competitors.

Vulkan is completely absent from MacOS and iOS, where Apple has pushed its own API, Metal. OpenGL on MacOS is deprecated and is stuck on 4.1, missing all the advancements in 4.6, which include mesh shader support.

Many Android games are likely still running GLES. Vulkan is pretty hard to get started with, because things that are implicitly handled by the OpenGL global state machine now have to be explicitly handled by the developer, and chances are the developers of the millions of throw-away microtransaction-laden game apps on Android aren't writing their own rendering engines in Vulkan.

Therefore, despite all the positives of Vulkan—open-source specification, cross-platform support, SPIR-V shader target allowing shaders to be written in any language (HLSL, GLSL, other esoteric languages that compile to SPIR-V), an extension mechanism allowing fast iteration and updates—it has a fairly uphill battle.

EDIT: I was incorrect, id Tech supports Vulkan exclusively. But it is a minority in a sea of D3D-first engines.

iD Tech, Source 2, Unreal, and Unity support Vulkan.

iD Tech targets Vulkan exclusively on PC: https://twitter.com/billykhan/status/1028133659168186368

Other points are also blatantly untrue, but I think I have made my point. At this point, targeting only DirectX is shooting yourself in the foot.

Other references: https://docs.unity3d.com/Manual/GraphicsAPIs.html https://www.khronos.org/news/press/khronos-group-releases-vu... https://docs.unrealengine.com/5.3/en-US/supported-features-b...

While I was incorrect about id Tech (and have edited my comment), I never made the point that any of the other engines didn't target Vulkan.

Where else is my comment untrue? Many engines and rendering back-ends have only recently completed a Vulkan-based implementation. I am confident in my assessment that the large majority of existing implementations are still running OpenGL and/or Direct3D, if on Windows.

Maybe i am wrong, but this tweet and wikipedia directly contradicts what you say (id tech does indeed use vulkan on windows): https://twitter.com/billykhan/status/1028133659168186368

I am just doing game dev on the side but i think nowadays the graphics abstractions are fairly similar in how they work (the modern abstractions, i.e. Metal, D3D12, Vulkan). Of course ideally you choose the graphics abstraction that is "native" to the platform, but vulkan seems to be supported very well on windows (many AAA game use it and it works great, many games run even better with vulkan abstraction than with their d3d12 counterpart). I use vukan so my graphics can run on windows and linux (which is why i chose vulkan instead of d3d12).

You are correct that idTech targets Vulkan (and they have some great GDC talks to boot)

They are however very much the minority.

I am suspect of your claim about Vulkan abstraction layers running better than DX12. If there is a performance difference, it’s likely elsewhere in the stack and just tangentially related.

I'm surprised by that as well.

I haven't done this stuff for quite a while, so my memory might be foggy, but the main advantage of Vulcan was that you can control all the CPU locking rather than the API doing it. This allows you to do stuff like prepare on one thread and submit on another, etc.

But that would be negated if you're using an abstraction layer.

> Almost all the famous, proprietary, high-performance game engines (id Tech, Frostbite, Slipspace, REDEngine, Source) target D3D exclusively.

You've said it there, hence my reply