Information on different performance optmizations for VR.

Due to the demanding rendering requirements Virtual Reality (VR) requires a number of performance optimizations and new rendering modes that are specific to VR have been introduced to Unreal Engine 4 (UE4). In the following document we will take a look at these features and how to use them in your UE4 VR projects.

VR Instanced Stereo

Instanced Stereo Rendering was introduced to help lessen the performance impact of VR in UE4. The feature can be enabled by checking the Instanced Stereo option that can be found under Edit > Project Settings > Rendering > VR.

Click for full image.

After Instanced Stereo rendering has been enabled, it will require an engine restart, and shader recompile.
The base pass, and early-z pass, works with static meshes, skeletal meshes, sprite particles, and mesh particles with the feature turned on (both serial and parallel rendering paths).
Instanced Stereo currently works on PC (DirectX) and PS4 with support for other platforms coming after the initial 4.11 release.
Here is a video showing Standard Stereo Rendering in VR, versus Instanced Stereo Rendering in VR.

VR Multiview Support for Mobile

Certain (supported) mobile devices can now support VR Multiview. Mobile Multiview is similar to Instanced Stereo rendering that is available to desktop PC's, and works by providing an optimized path for Stereo Rendering on the mobile device's CPU. To enable this feature, you will need to do the following:

Due to the experimental nature of this feature, it will only work on modern Mali-based GPUs. As this feature matures, and support for more mobile devices come online, this warning will be removed.

From the Main Toolbar, go to Edit > Projects Settings, to open the Editor's Project Settings.

Enable the Mobile Multi-View (Experimental) option by click on the checkmark box next to its name, and then restart Editor for the changes to take effect.

Click for full image.

For this feature to work, you will need your Android build settings to be setup like the following:

Make sure that Support OpenGL ES2 is enabled in the Android > Build section.

Make sure that both Mobile HDR and Instanced Stereo Rendering are disabled.

Currently, Mobile Multiview will only work with modern Mali-based GPU's.

If you package a project with this feature on, but don't have a compatible GPU, it will be disabled at runtime.

VR Forward Rendering

By default, Unreal Engine 4 uses a Deferred Renderer as it provides the most versatility and grants access to more rendering features.
However, there are some trade-offs in using the Deferred Renderer that might not be right for all VR experiences.
Forward Rendering provides a faster baseline, with faster rendering passes, which may lead to better performance on VR platforms.
Not only is Forward Rendering faster, it also provides better anti-aliasing options than the Deferred Renderer, which may lead to better visuals.

VR Performance Profiling

To track down assets that are too expensive for VR, you need to profile what your project is doing on the CPU and GPU as much as possible over the lifetime of your project.

GPU Profiling - To activate the GPU profiler, all you need to do is press CTRL + SHIFT + ,(Comma Key) together, while running your project. After the keys have been pressed, you will see a new window come up that should look similar to the image below.

CPU Profiler - Profiling what your project is doing on the CPU is a bit more involved than profiling for the GPU. To find out more on how to do this, please refer to the Performance Profiler documents.

VR Post Process Settings

Due to the demanding rendering requirements of VR, many of the advanced Post Processing features that are enabled by default should be disabled, or your project could suffer
from performance problems. To accomplish this in your project, you will need to do the following.

Add a Post Process(PP) volume to your level if there is not one already there.

Select the PP volume, and in the Post Process Volume section, enable the Unbound option so that the settings in the PP volume will be applied to the entire level.

Expand the Settings of the Post Process Volume, and then go through each section to disable any active PP settings by enabling that property; clicking on it, and then setting the value from the default (usually 1.0) to 0, thus disabling the feature.

When doing this, you won't need to hit every section and set all of the properties to 0. Instead, first disable the really heavy hitting features like Lens Flares, Screen Space reflections, Temporal AA, SSAO, Bloom and anything else that might have an impact on performance.

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.