Most of us gamers have heard of Microsoft’s DirectX. However, few of us are familiar with its utilities and how it affects video games. Nowadays, in fact, having acquired a competitor in the form of Vulkan, things concerning the two APIs tend to get even more complicated. In this guide, we’ll see what an API is, what Vulkan and DirectX are, and we will further go through the method by which these affect our games.
Unblock any international website, browse anonymously, and download movies and Mp3 with complete safety with CyberGhost, just for $2.75 per month:
Preliminary Information concerning APIs
Before we start talking about DirectX and Vulkan, we need to first understand what an API is. The acronym stands for "Application Programming Interface".
An interface is designed to achieve communication between two entities. One example is the Windows graphical interface, which plays the role of an intermediary between the operating system and the user.
The interface provides us with a user-friendly environment. Via this environment, we use the operating system without having to know how its functions are implemented in the background.
An application programming interface (API) fills the role of the mediator. This time around, however, the user can be a PC or another program and not necessarily a human being.
APIs are much more common than one would think, offering programmers the necessary tools to create their software.
An indicative instance where we use an API is when we automatically log in a new social medium or online service by using our pre-existing accounts from Facebook or Google (instead of creating a new account manually).
In such cases, the website makes use of an API via which it contacts the specific service (e.g. Facebook or Twitter) in order to collect our personal information (name(s), email, contact numbers, etc.) for the creation of our new account.
However, there are countless other API uses for all sorts of interplay between applications and computers such as on database systems, operating systems, and software libraries.
In such cases, the use of APIs is applicable to our computer hardware, and specifically, to our graphics card(s).
DirectX and Vulkan virtually improve the way communication between the application (game) and the GPU is achieved, in order to get better graphics performance.
With the release of Windows 95 and the protected memory model, developers did not have the same access to resources as in MS-DOS.
DirectX made its first appearance in the form of a set of specific APIs for the development of multimedia applications such as games.
The term ‘DirectX’ begins with the word ‘Direct’, alluding to the direct access to the systems’ resources. Some examples include Direct3D for graphics and DirectSound for audio.
The ‘X’ part refers to an API in the general collection; thus bringing together all APIs under the DirectX name. The above name also inspired the name of the company's popular video game console, the Xbox.
The above illustrates the close relationship between DirectX and Microsoft's console.
Its latest version, DirectX 12, comes with great improvements. However, it is supported only by Windows 10 and by the latest gaming console of the company, the Xbox One.
Direct3D is DirectX 's crown jewel and is useful for producing 3D objects on our screen. It also allows us to view games in full screen, as well as the use of hardware accelerators.
The latter method allows some functions to be implemented more efficiently than they are running in the software. This can be achieved by more efficiently exploiting the hardware of our computer. In this case, that would be our graphics card.
In 2015, Kronos Group brought forth its own API. Vulkan is a low-level API used for designing graphically demanding applications. Its first stable version made its debut in August of 2016.
It should be made clear that by "low-level", we do not refer to the quality. Instead, this term describes Vulkan’s ability to work at the hardware level.
Khronos surrounds itself with some of the biggest names in the IT industry. Some of them are Google, Intel, Sony, Nvidia, and AMD. The last two gave its API, Mantle, to Khronos so as to minimize the development time of Vulkan.
OpenGL is a popular API among graphic designers. It was, in fact, developed by Khronos, and it also incorporates many of Vulkan's characteristics. However, its reception by game designers was unforeseen
One of Vulkan's stronger assets is the fact that it's open-source. Additionally, Vulkan's compatibility with multiple platforms along with its overall performance, are two additional assets which make it more lucrative than DirectX.
Here you can find the full list with the names that comprise Khronos. Mantle provided the ground base upon which Vulkan was developed. Lastly, Vulkan is currently at its 1.1 version.
How they affect Games
Up to this point, we went through some of the basics concerning APIs, Microsoft, and Khronos. But how do they affect games?
The two APIs have accomplished some great improvements in terms of performance. Thus far, DirectX seems to provide better performance than Vulcan, which, in reality, is not so far behind.
Microsoft claims that DirectX 12 reduces the processing consumption by 50% when put against DirectX 11. On the other hand, Vulkan also demonstrates better flexibility than its predecessor.
Speaking of predecessors, DirectX 11 and OpenGL were created with single-core processors in mind; meaning that they were not fine-tuned with the newer, multi-core ones.
As a result, a single core manages most of the various processes, while the remaining ones operate at a low rate and sometimes not at all.
Both APIs (DirectX 12 and Vulkan) support processors with multiple cores and threads, in order to use their capabilities as efficiently as possible.
Moreover, they transfer a big portion of the demanding tasks from the processor to the graphics card(s), offering a more balanced experience.
The interplay between the above two elements may greatly affect future PC-builds. Graphics cards are, to a great extent, more important than processors when it comes to gaming.
With the further development of gaming APIs, it's not unlikely that processors could become even less important when it comes to it. Thus, even with a simple processor, we may get good performance with no bottlenecks.
Multiple Graphics Cards Support
Here, Khronos Group covered a significant gap between the two APIs with the support of the use of multiple graphics cards (Explicit Multi-GPU usage).
We can use different cards, as long as their chips have a similar architecture and use the same driver. This will allow different cards to process a different part of the screen.
Microsoft takes it one step further, allowing the use of multiple graphics cards from even a different manufacturer, which is often the case since most systems have an independent and integrated GPU.
It is important to stress the fact that these implementations are different from the capabilities of SLI and Crossfire by Nvidia and AMD, which are implemented through drivers, and specifically, in the case of SLI, require identical graphics cards.
Shaders are small programs that run on our graphics cards. They are responsible for certain features of various objects in the 3D environment. Shades, fog, and lighting in a game are all the result of a shader.
Vulkan uses an intermediate representation for shaders called SPIR-V. Its binary form is similar to DirectX's DX bytecode.
SPIR-V version 1.3 featured SPIR-V opt, a tool for reducing the size of shaders. The maximum size reaches + 40% of that of the DX bytecode of the corresponding representation for DirectX.
Also, some structures in HLSL (high-level shader language), which were designed by Microsoft, were not supported directly by some graphics cards.
HLSL has been widely used by DirectX since version 9. It was used as an addendum for the existing shader assembly language. With the new version of SPIR-V, Vulkan supports it as well.
Thus, developers will be able to use the existing code for their shaders, and they will not need to reinvent the wheel. Consequently, games will be easily ported from one platform to another.
Compatibility with multiple platforms
On the topic of platforms, Vulkan's big advantage is that it supports Windows, Linux, Mac OS, Android, and iOS. DirectX 12 on the other hand, is only supported on Windows 10 and Xbox One.
In order to leverage the improvements that DirectX 12 offers, we will need to either upgrade our operating system to Windows 10 or to own the new console of the company.
If you want to try DirectX 12 and you didn't happen to get Windows 10 during the free upgrading period, check our step-by-step guide to the free upgrading methods still available:
Returning to our previous subject, a game port supported by Vulkan's API will be significantly easier compared to a port supported by DirectX.
So, on one hand, we can have titles available on more than one platform, and on the other, different operating systems have the opportunity to host our games.
One reason why Linux is not as popular as Windows has to do with the fact that the latter excels in gaming.
A Linux distribution can be a better choice to host our games since it can be adjusted for that purpose. Steam OS, for instance, is a specialized operating system exclusively designed for games.
Also, consider this: A company is thinking about making a game development software and wants to support an API. Who would you choose?
Both have similar power yields, both are better than their predecessors, and both provide explicit use of the graphics cards. Vulkan supports all platforms including, Windows 10 and Xbox One, while DirectX supports only the last two.
It's necessary to say that Vulkan exemplifies great improvements in the area of Virtual Reality. A VR application needs to render a specific 3D scene from two different perspectives - one for each eye.
Up to this point, the above has been possible by sending all the necessary commands to our graphics card in order to form the 3D image for one perspective. The approach is the same for the perspective of our second eye.
Vulkan's 1.1 version offers a set of render commands to form multiple, slightly different outputs (images), which ultimately yield in better performance in VR applications.
Development and the Future
It would be an omission not mention the development course of the two APIs here. On one hand, we have the veteran DirectX, with more than 20 years of development. On the other hand, Vulkan barely counts 3 years since 2015.
The fact that Vulkan is open-source can affect its growth rate quite a bit. Of course, Khronos players seem to have taken the development of the API seriously, since the levels of improvement are impressive.
Additionally, all of us are able to create new tools and modifications and provide them to the community, helping the API grow faster. Finally, we should mention that DirectX lacks the above feature.
So, despite its years of development, around 40 titles are currently using Vulkan, occupying much of the market. Some of them are Quake, Roblox, The Talos Principle, and Dota 2.
In terms of performance, Vulkan is approaching DirectX, and there are some cases where it surpasses it. The most exciting examples of Vulkan's performance are the Doom franchise …
…and the Ashes of the Singularity.
Both APIs have made significant improvements in performance. Better use of multiple graphics cards and less CPU usage will increase the overall performance of our systems.
Rumor has it, that the new graphics cards from Nvidia will be released by the end of the summer, and will significantly outperform today's high-end graphics cards. Overall, the general state of things seems rather flexible.
In any case, change in game development will soon be upon us, and both APIs will undoubtedly play an important role.
What is your opinion on the two APIs?
Were you already aware of all the information we provided on Vulkan and DirectX? With their rivalry intensifying by the day, which of the two APIs do you consider more beneficial to game development? We look forward to your comments.
Do you want to support PCsteps, so we can post high quality articles throughout the week?
If you prefer your purchases from China, we are affiliated with the largest international e-shops: