By default, Unreal Engine 4 (UE4) 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.

Enabling Forward Shading

To enable the Forward Shading Renderer:

In the Edit menu, open the Project Settings. Select the Rendering tab on the left and locate the Forward Shading category. Enable Forward Shading.

You will be prompted to restart the editor where after the restart, you can begin using the Forward Renderer options and features.

Enabling Multisample Anti-Aliasing

To use Multisample Anti-Aliasing (MSAA):

In the Edit menu, open the Project Settings. Select the Rendering tab on the left and locate the Default Settings category. Set the Anti-Aliasing Method property to MSAA.

The forward renderer supports both MSAA and Temporal Anti-Aliasing (TAA) and in most cases, TAA is preferable because it removes both geometric aliasing and specular aliasing. In VR however, the constant sub-pixel movement introduced by head tracking generates unwanted blurriness, making MSAA a better choice. Projects that choose to use MSAA will want to build content to mitigate specular aliasing. Additionally, the Normal to Roughness feature can help reduce specular aliasing from detailed normal maps and automatic LOD generation for static meshes can flatten features on distant meshes to help reduce aliasing from small triangles.

In our tests, using MSAA instead of TAA increases GPU frame time by about 25% (actual cost will depend on your content).

Below an example is given with Temporal AA enabled versus 4X MSAA enabled.

You can use the console variable r.MSAACount to control how many MSAA samples are computed for every pixel. r.MSAACount 1 disables MSAA. Assigning r.MSAACount 0 will fall back to using Temporal AA, which allows for convenient toggling between Anti-Aliasing methods.

Performance and Features

Switching from the Deferred Renderer to the Forward Renderer may provide you with an increase in performance for your project.

The forward renderer can be faster than the deferred renderer for some content. Most of the performance improvement comes from features that can be disabled per material. By default, only the nearest reflection capture will be applied without parallax correction unless the material opts-in to High Quality Reflections, height fog is computed per-vertex, and planar reflections are only applied to materials that enable it.

Leveraging these options in Epic's new VR game, Robo Recall, the forward renderer is about 22% faster than the deferred renderer on an NVIDIA 970 GTX.

The Forward Renderer works by culling lights and Reflection Captures to a frustum-space grid. Each pixel in the forward pass then iterates over the lights and Reflection Captures affecting it, sharing the material with them. Dynamic Shadows for Stationary Lights are computed beforehand and packed into channels of a screen-space shadow mask, leveraging the existing limit of 4 overlapping Stationary Lights.

Be sure to use Unreal Engine's Performance and Profiling Tools to gauge the performance of your game when switching from the Deferred Renderer to the Forward Renderer. You will want to pay special attention to GPU Profiling to see where GPU cost is going, as well as using the Stat Commands to aid with your profiling efforts.

Supported Features

This list comprises the currently supported features of the Forward Renderer:

Full support for Stationary Lights, including Dynamic Shadows from Movable objects which blend together with precomputed environment shadows

Multiple Reflection Captures blended together with parallax correction

Planar Reflections of a partial scene composited into Reflection Captures

DBuffer Decals

Precomputed Lighting and Sky Lights

Any number of unshadowed Movable Lights

Capsule Shadows

Alpha-to-coverage for Masked Materials

Instanced Stereo Compatible

Up to 4 overlapping Shadow Casting Movable Lights

Light Functions on shadow casting lights

Known Issues & Common Questions

The following features are not supported while using the Forward Renderer:

Screen Space Techniques (SSR, SSAO, Contact Shadows)

Dynamically Shadowed Translucency

Translucency receiving environment shadows from a Stationary Light

MSAA on D-Buffer Decals and Motion Blur

Below are some common questions/issues that may arise when using the Forward Renderer.