This guide covers how to implement AppSW in your Unreal application. To learn how AppSW works, and how to debug it, go here.
Application SpaceWarp (AppSW) is a feature that achieves a step function improvement in both performance and latency at a significant magnitude. It’s one of the most substantial optimizations shipped to Quest developers. In our initial testing, it gave apps up to 70 percent additional compute, potentially with little to no perceptible artifacts.
However, enabling AppSW is a serious technical commitment. It requires modifying your app’s materials and render pipeline; any materials that have not been modified to support AppSW will produce artifacts when running with AppSW.
To help you use AppSW optimally, we have created this guide to discuss the technical considerations and tradeoffs to implement it appropriately.
API and integration considerations
At the native API level, AppSW is enabled in Quest apps through the OpenXR extension XR_FB_space_warp. Our game engine integration handles that for developers, but it is good knowledge for curious developers to understand how it works. Please check our native developer guide and sample project XrSpaceWarp in the OpenXR SDK package to learn more.
How to Enable AppSW in App
AppSW is fully integrated with UE4.27-v34 and shipped via Oculus Github. To enable AppSW, follow the steps below:
Prerequisites: AppSW under UE4 requires Mobile Multiview + OpenXR Ovrplugin + Vulkan must be enabled.
Enable AppSW support by checking the box under Engine - Rendering.
Steps 1 and 2 will make your app capable of enabling AppSW in any frame of the game. The feature itself is controlled by the console variable r.Mobile.Oculus.SpaceWarp.Enable. Like all the other console variables, you can enable it in the middle of the game play by setting it in your C++ code or by using Blueprints. The following is an example of how to enable AppSW when a user is holding the right controller trigger and disabling it when releasing the trigger.
If you prefer the app to run with AppSW from the start, add it into the DefaultEngine.ini file as such: