Version: 2021.3
Language : English
OpenGL Core
Unity Remote

Vulkan

Vulkan is a modern graphics API that works across multiple platforms including mobile and desktop. Unity supports Vulkan allowing you to target Vulkan-capable devices and providing direct control over the GPU.

Platform compatibility

Unity supports the Vulkan API for developing applications on the following platforms:

  • Android
  • Embedded Linux
  • Linux
  • Windows

For developing XRAn umbrella term encompassing Virtual Reality (VR), Augmented Reality (AR) and Mixed Reality (MR) applications. Devices supporting these forms of interactive applications can be referred to as XR devices. XRAn umbrella term encompassing Virtual Reality (VR), Augmented Reality (AR) and Mixed Reality (MR) applications. Devices supporting these forms of interactive applications can be referred to as XR devices. More info
See in Glossary
applications, Unity supports Vulkan on the Windows and Android platform.

Vulkan on Android

When you create a new Android project, Vulkan is enabled as the default graphics API. For other platforms where Vulkan is not the default graphics API, you can enable it through Unity Editor’s Player settingsSettings that let you set various player-specific options for the final game built by Unity. More info
See in Glossary
. For more information, refer to Override default graphics APIs.

When developing a Unity Android project with Vulkan, consider the following recommendation:

Swapchain pre-rotation

It is recommended to enable framebuffer orientation through the Android Player settings. For more information, refer to the documentation on Vulkan swapchain pre-rotation.

Advantages and limitations

Consider the following advantages and limitations of using Vulkan as the graphics API in your Unity project.

  • Vulkan enables High Definition Render Pipeline (HDRP) support on Linux.
  • On Linux and Android, Vulkan generally supports more capabilities, such as graphics jobs and direct control over the GPU, which aren’t available in OpenGL Core on Linux or OpenGL ES on Android.
  • Unity doesn’t support Vulkan for Windows on Arm devices. If your application targets such devices, consider using alternative graphics APIs supported by Unity.
  • On Windows, some features such as async compute and ray tracingThe process of generating an image by tracing out rays from the Camera through each pixel and recording the color contribution at the hit point. This is an alternative to rasterization. raytracing
    See in Glossary
    are currently not implemented for Vulkan. For these features, D3D12 is recommended in Unity.

Key features and differences in Vulkan API

Vulkan supports several features and capabilities that differentiate it from other graphics APIs, such as OpenGL.

  • Graphics jobs: Vulkan supports graphics jobs, a feature that allows rendering tasks to run on multiple threads. This might help improve performance of your application. Graphics jobs feature isn’t supported with OpenGL.
  • Dynamic ResolutionA Camera setting that allows you to dynamically scale individual render targets, to reduce workload on the GPU. Dynamic ResolutionA Camera setting that allows you to dynamically scale individual render targets, to reduce workload on the GPU. More info
    See in Glossary
    : Vulkan supports dynamic resolution scaling on devices allowing to adjust the resolution of the individual render targets in real time. This feature reduces workload on the GPU thereby improving performance of your application.
  • Memoryless Render Textures: On some Vulkan compatible platforms, memoryless render texturesA special type of Texture that is created and updated at runtime. To use them, first create a new Render Texture and designate one of your Cameras to render into it. Then you can use the Render Texture in a Material just like a regular Texture. Memoryless Render Textures: On some Vulkan compatible platforms, memoryless render texturesA special type of Texture that is created and updated at runtime. To use them, first create a new Render Texture and designate one of your Cameras to render into it. Then you can use the Render Texture in a Material just like a regular Texture. More info
    See in Glossary
    temporarily store data in the on-tile memory during rendering. This can help improve performance and reduce memory usage of your application.
  • Direct control over GPU: Unity uses Vulkan’s direct GPU control capability to support the -force-device-index option, allowing you to specify which GPU Unity’s Standalone Player should use. This capability of Vulkan allows you to optimize your application for better performance. This feature isn’t supported with OpenGL.
  • XR features: Vulkan is recommended for Android XR and Meta Quest devices because some newer graphics features are only supported with Vulkan. Vulkan API is more stable and provides better performance compared to OpenGL in URP projects targeting XR platforms.

Additional resources

OpenGL Core
Unity Remote