DirectX vs Vulkan: Battle of the Modern Graphics APIs

Microsoft’s DirectX and Khronos Group’s Vulkan are two popular graphics APIs that most game developers use today. Basically, Vulkan and DirectX facilitate the proper allocation of hardware resources (CPU and GPU) so that your game can run the way they do, with high frame rates and quick render times. But, how do these two graphics APIs, Vulkan and DirectX, fare against each other? Which is the better one for playing games? Let’s find out.

Vulkan vs DirectX: History & Development

First, let’s discuss the development and history to show you the importance of a graphics API such as DirectX and Vulkan.

PC Gaming Began with DirectX

In the start, DirectX was developed by a team at Microsoft who were essentially working towards increased adoption by game developers, so that the Windows-based PCs would have games for its users. Before DirectX came along, developers back then preferred to make games for DOS and did not intend to release new titles for Windows.

This was back when Windows 95 was going to come out. Apart from DOS games, console gaming was also steadily growing. DirectX 1.0 was released in September 1995 and was referred to as Windows Game SDK.

“Essentially it’s called DirectX because it was designed to bypass the operating system, to push Windows aside, get it out of memory, get rid of all the garbage competing with games for resources, and just let the games run.” – Alex St John, Mastermind behind DirectX

Alex St John, part of the DirectX team, revealed in an interview that Microsoft had to persistently persuade game developers to start using DirectX. Their concerns were listened to and later utilized as integral feedback to improve gaming on Windows so that developers would actually make new games for the operating system being used by millions.

old and new directx logo
Image Courtesy: Microsoft

There were some wild marketing stunts made during the inception of DirectX to attract the gaming industry towards using the API and motivate them to make Windows PC games.

With DirectX, game developers could utilize the hardware of the PC without the OS bothering them. DirectSound (responsible for audio processing), DirectPlay (that handled in-game communications, and DirectDraw (graphics rendering) were all part of DirectX 1.0, which was referred to as “Game SDK” or “Project Manhattan” back then. Today, DirectX is known to be a collection of APIs and it is widely used for many games. DirectX 12 is the latest version, but many games also use DirectX 11. You can understand the difference between DirectX 11 and DirectX 12 in our dedicated explainer.

Vulkan Was Made to Achieve Similar Goals; but Implemented Differently

Speaking of Vulkan, its foundation can be traced back to the introduction of American chipmaker AMD’s Mantle API. AMD, along with DICE, worked to create Mantle. It was used in games such as Sniper Elite III, Battlefield 4, and Civilization: Beyond Earth.

Vulkan was touted to have better performance than DirectX11. Moreover, there were claims to improve performance in CPU-bottlenecked situations. More game engines started to use Mantle as an API. However, the adoption wasn’t so strong even with all the advantages. Later on, AMD gave the Mantle API (as a “donation”) to the Khronos Group who later used it to develop a whole new API.

Later, Khronos introduced Vulkan as a new graphics API at GDC 2015. Today, it is a notable open standard and Vulkan is used in many games in addition to DirectX 11/12.

Image Courtesy: Khronos Group

A key difference in Vulkan compared to DirectX is that it is a cross-platform API (desktop and mobile). The design features of Vulkan, such as the reduced “driver overhead” eating up valuable performance, were part of the key improvements found in the newest DirectX 12 implementation.

Both DirectX and Vulkan have improved drastically over the last five years and have their own advantages. So, let’s discuss them and compare the performance of DirectX vs Vulkan in several games of today.

DirectX vs Vulkan: Advantages Compared

Vulkan is said to use the hardware resources of your PC more efficiently. So, the CPU, GPU, and RAM usage here is said to be more “balanced” as compared to DirectX 12. Vulkan is a lower-level API, and it is open source. Plus, it is cross-platform so developers can save time if they want to release their title on both PC and mobile platforms. However, some also say that Vulkan is more complex to use, which can increase the overall time taken to develop something as compared to other APIs.

From the perspective of a developer, Vulkan being open-source and cross-platform makes it quite appealing to use. With that, there is also a ton of educational material to learn Vulkan if someone is new to graphics and game development. Some even call the Vulkan API to be easier and cleaner to use, with better documentation as compared to DirectX. In the end, some games choose to provide both APIs to select within the game.

ray tracing
In the modern era, both Vulkan and DirectX 12 APIs support the latest ray-tracing features

By the way, DirectX is used for Windows PCs and Xbox gaming consoles. But Vulkan is available to use on Linux, Windows, and mobile platforms. Nintendo Switch has a Nvidia Tegra GPU, which is also known to support Vulkan. By the way, according to this game optimization and porting story of Detroit Become Human, it is said that PlayStation gaming consoles have better APIs (described as very direct and has very low overhead) than anything on PC as those are dedicated machines made for gaming.

DirectX vs Vulkan: Performance Comparison

Now, let’s consider the perspective of a general consumer, like you and me who play video games. If there is no choice of graphics API, then the user has to play whatever the game uses. But if there is an option, the performance of DirectX or Vulkan depends on a per-case basis. To tell you about this in detail, we have compared the performance of DirectX vs Vulkan graphics API below.

I tested two popular games where users wonder whether to use Vulkan or DirectX when launching the game. For testing, I employed my Acer Nitro V, which we covered as a value-for-money gaming laptop recently. The CPU here is an Intel Core i5-13420H paired with an Nvidia GeForce RTX 4050 GPU and 16GB DDR5 memory.

Keep in mind that your performance numbers might vary based on the PC’s components – DirectX could be better for some cases, while Vulkan may be preferred by others. While I also wanted to test DirectX 11 vs Vulkan in Baldur’s Gate 3, I could not do it because the game kept crashing. Once that is fixed, I will be sure to update this section with those benchmarks.

Red Dead Redemption 2: DirectX 12 vs Vulkan

red dead redemption 2 game directx 11 vs vulkan performance FPS comparison on PC

In Red Dead Redemption 2, the results were a bit similar. Vulkan achieved better minimum FPS and overall had a better FPS range. It also felt a bit smoother with a greater average FPS depending on the scene. With DirectX 12, the game had a higher maximum FPS but a lower minimum FPS. The experience was slightly better on Vulkan in my testing. Some people report experiencing stuttering issues with Vulkan, while others say they are having inconsistent performance with DirectX.

To switch between Vulkan or DX12 in RDR2, go to your in-game graphics settings and scroll down to advanced graphics settings. Here, switch between Vulkan & DirectX 12. Then, you can run the in-game benchmark to get the FPS numbers. Whatever gives you better average FPS is probably the right choice of graphics API in the game.

Path of Exile: DirectX 11 vs DirectX 12 vs Vulkan

path of exile directx 11 vs directx 12 vs vulkan api performance comparison

Path of Exile is an older game, but it has been regularly updated and has tons of players. Here, you can select between three graphics APIs: DirectX 11, DirectX 12, and Vulkan.

I tested all three and found out that Vulkan is the best for my Acer RTX 4050 gaming laptop. I was hitting ~80 FPS in most scenarios with Vulkan. While DirectX11 delivered better performance numbers, it is older (released in 2009) as compared to Vulkan (released in 2015). DirectX12 gave us unsatisfactory results with FPS going lower than 60 in some scenarios.

DirectX vs Vulkan: Which Should You Use?

Depending on the combination of your system specifications, one of these two APIs could perform better. It also depends upon the game optimization. To decide which graphics API to use between DirectX and Vulkan, you should test your in-game performance and compare the FPS.

Usually, DirectX is the one with more stability but the opposite can also be true sometimes. I feel Vulkan is better as it is said to be a balanced API that doesn’t have too much overhead either. AMD GPU owners can also benefit from using Vulkan, maybe because the backbone of Vulkan (Mantle) was essentially authored by AMD.

But in the end, for the gamers out there, whichever API runs better is the one you should use. What are your thoughts on DirectX vs Vulkan? Let us know in the comments below.

comment Comments 0
Leave a Reply