Unity Vulkan



  1. Unity Vulkan Performance
  2. Unity Vulkan Vs Dx12
  3. Unity Vulkan Android

Unity作为一个移动平台最为成功的游戏开发平台,从2016年12月,Unity Technologies表示Unity游戏引擎5.6版将支持Vulkan API;到2017年3月,Unity 5.6提供正式支持Vulkan API,再到Unity 2019.2增加了许多Vulkan补丁,Unity一直在提高游戏画质与提升游戏性能的道路上奋力前行。. Graphics API support Unity supports DirectX, Metal, OpenGL, and Vulkan graphics APIs, depending on the availability of the API on a particular platform. Unity uses a built-in set of graphics APIs, or the graphics APIs that you select in the Editor. To use Unity’s default graphics APIs. Unlike DirectX 12, Vulkan actually offers a decent performance boost on most games. In fact, Unity promise their developers will get “a rendering performance improvement out-of-the-box up to 60%”.

With the announcement of Android N back a few months ago, Google mentioned that Android would be supporting the new Vulkan graphics API . If you haven’t heard of Vulkan then we have a full rundown in our Vulkan – everything you need to know article, plus we did a deep dive into making high performance 3D apps with Vulkan. One key question is this, how does Vulkan perform compared to OpenGL ES 3.1 and OpenGL ES 2.0? Let’s find out.

Methodology of the tests

At the moment, there is no easy way to test Vulkan versus OpenGL ES 3.1 on Android. My go to 3D engine Unreal Engine does not support the Android-24 API, so while Vulkan is technically supported, I was not able to get Vulkan working on my Nexus 6P to do this.

Instead, I will be using Nvidia’s samples for this article to test Vulkan, OpenGL ES 3.1 and OpenGL ES 2.0 on my desktop for performance tests and Unreal Engine for graphics comparisons between Vulkan on mobile with OpenGL ES 2.0, OpenGL ES 3.1. In the Nvidia tests the CPU and GPU usage will all be monitored and the graphics quality will be noted in the Unreal Engine tests. Let’s get started with graphics.

Graphics comparison


Vulkan offers greater performance compared to its OpenGL brothers and greater control of the hardware allowing for a boost in graphics quality do to better optimizations. But how does this translate into the real world?

Compared to OpenGL ES 3.1, at least in Unreal Engine made for mobile, there is no difference in graphics. That being said, most games run in OpenGL ES 2,0, and there is a huge difference here, which you can see above. The problem with OpenGL ES 3.1 is that while the graphics look immensely better than OpenGL ES 2.0, the performance hit is so great that games are basically not playable, looking at the image above comparing OpenGL ES 2.0 and 3.1 on my Nexus 6P shows that the exact same scene runs at a third of the frames per second compared to OpenGL ES 2.0. This is where Vulkan comes in, offering at least the same in graphics quality, but with improved performance. So how does Vulkan do?

Performance comparison


Vulkan does amazing actually, the results show that Vulkan more than triples the FPS compared to OpenGL ES 3.1. There are a few reasons to why this is. First, it may be hard to see in the picture, but my computer’s CPU usage is more than doubled on all 8 threads and my computer is able to handle two million fish per second compared to around 900 thousand while using OpenGL ES 3.1. The multithreading capabilities are a lot better with Vulkan, allowing for all 8 cores to get a workout, not just one.


The CPU usage reported in task manager is more than likely a bit misleading. I believe this is the case because Vulkan spreads out the load of this example across all 8 cores, instead of just one with OpenGL ES 3.1. So while it is technically using more of my CPU, the CPU is not as stressed as the work is spread out between the cores. Notice that the RAM usage does not change between tests as well.

Looking at the draw calls, Vulkan allows for a little more than 3 times the amount compared to OpenGL ES 3.1. A “draw call” is how many objects are being drawn on the screen at a time. Usually, you want this number to be lower, as performance can suffer, but in this case, the new API stomps all over ES 3.1 while still having a higher draw call.

Looking at the GPU usage while running these tests, it’s about the same, with about 20 percent GPU usage in Unreal Engine and 4 percent for the Nvidia test. OpenGL ES 3.1 used about an extra percent than its newer brother. While this is essentially nothing to my desktop, on a phone this could be a huge difference and we could see 10-20 percent GPU difference possibly. What is actually giving it better performance is the lower level control and relying on the developer more than the drivers to decide where your device’s resources go.

Unity Vulkan

Looking at this data, Vulkan still will not perform as well as the lower graphics capable OpenGL ES 2.0, as Vulkan displays a lot more on screen and the scenes it can render are a lot more complex, but this is to be expected.

Imagination has also observed similar results in their tests. Showing that the CPU load is spread across the four cores and the FPS increases by quite a bit. This test really shows how well the new API works with multiple threads and how much it benefits from doing this.

What does this mean for Android?

This is an interesting question, as at the time of writing, there are only a few devices that are actually able to utilize Vulkan. While new flagship devices running Android 7.0 will most likely support Vulkan, it will take awhile for developers to integrate the new API into their games, especially since third party engines do not fully have Vulkan integrated for Android, like Unreal Engine. Or not at all, like Unity.

All of this will come with time, of course, but I would not hold my breath, as there are a few stars that need to be aligned before your device supports the new API. For reference, Vulkan will be supported on Snapdragon 8xx and up with Adreno 4xx GPUs and up and Exynos 5433, 7420 and 8890 and presumably everything proceeding those models. Once Vulkan is used correctly, games will see a massive jump in quality with very little to no penalties as the API and hardware advances over the years. This is definitely an exciting time to be a developer and gamer.

Wrap Up

Vulkan looks very promising for not just Android, but also for the desktop. The numbers do not lie, and Vulkan beats OpenGL ES 3.1 no problem. The real question is how fast will developers start implementing the new API in their games. As engines progress and development gets easier, I see no reason why not to.

Let us know in comments what you think of these results!

Join GamesBeat Summit 2021 this April 28-29. Register for a free or VIP pass today.

The Unity game engine, which powers most of the apps on the Oculus store, now supports the Vulkan graphics API with Oculus Quest.

Vulkan is the successor to OpenGL, the industry standard graphics API that has been in widespread use for over two decades. I want to activate my windows 7 ultimate for free. OpenGL is similar to DirectX up to version 11, but controlled by an open industry consortium and is cross platform.

Like DX12 for Windows and Metal for Apple hardware, Vulkan is a “low level” graphics API (LLAPI). These APIs give developers more direct access to the hardware than previous graphics APIs, moving many tasks from the GPU driver to the game engine.

Vulkan is designed to properly take advantage of multi-core CPUs, which were not a relevant factor when OpenGL was created. The Oculus Quest has four main CPU cores, three of which are available to games.

While Unity 2019.3 supports Vulkan on Quest, the current Oculus Integration for Unity does not. This is, however, simply due to a check it performs to see if Vulkan is enabled, which can be bypassed by commenting it out.

The benefits

Vulkan’s lower level access to the hardware means there is less driver overhead for draw calls (instructions from the CPU to the GPU of what objects to draw). This means that more draw calls can be used each frame — or the same number of draw calls per frame will use less CPU power and energy.

How to get starcraft 2 for free full version. This means that Vulkan could enable Quest developers using Unity to ship more detailed scenes, use larger draw distances, use leftover CPU power for physics, or just increase battery life of existing fidelity content.

Vulkan should also provide for significantly faster initial loading times. Do you notice that some Quest games take a very long time to load the first time you launch them? That’s because OpenGL shaders are compiled on first load, whereas with Vulkan shaders can easily be precompiled.

Unity Vulkan Performance

Facebook claims that Vulkan also provides for HDR rendering on mobile, which could be useful for future headsets.

Performance numbers

There are no specific benchmarks for a production Oculus Quest Unity app of OpenGL vs Vulkan performance yet. When Unity first added Vulkan support for regular Android games, the company claimed “up to 35% improvement” in performance.

Unity’s competitor, Unreal Engine, already added support for Vulkan on Quest back in August. While there are no public benchmark stats for Unity’s Quest Vulkan support yet either, Facebook claimed that on Epic’s Sun Temple engine sample Vulkan reduces frame times from 16ms to 13ms, a roughly 20% improvement.

To be clear, Vulkan is not a silver bullet. Optimizing a VR game to run on a smartphone processor is incredibly difficult, and most of the work still falls to each developer. But Vulkan support in Unity promises to make the rules slightly less extreme, so we’ll be keeping a close watch on the Quest content ecosystem this year to see what it enables.

This story originally appeared on Uploadvr.com. Copyright 2020

GamesBeat

GamesBeat's creed when covering the game industry is 'where passion meets business.' What does this mean? We want to tell you how the news matters to you -- not just as a decision-maker at a game studio, but also as a fan of games. Whether you read our articles, listen to our podcasts, or watch our videos, GamesBeat will help you learn about the industry and enjoy engaging with it.How will you do that? Membership includes access to:

Unity Vulkan Vs Dx12

  • Newsletters, such as DeanBeat
  • The wonderful, educational, and fun speakers at our events
  • Networking opportunities
  • Special members-only interviews, chats, and 'open office' events with GamesBeat staff
  • Chatting with community members, GamesBeat staff, and other guests in our Discord
  • And maybe even a fun prize or two
  • Introductions to like-minded parties

Unity Vulkan Android

Become a member