I strongly recommend everyone with PC VR projects to try out the forward renderer immediately with the 4.14 preview and post feedback! There’s a small window where bug fixes (but not new features) may still make it into the final 4.14 release.
Edit: the 4.14 branch is locked down, so all future improvements will end up in 4.15. Thanks to everyone who responded with feedback.
Forward Shading Renderer for VR (experimental)
We now have a Forward Renderer that supports the high quality lighting features of UE4, enables Multisample Anti-Aliasing and is 22% faster than the default Deferred Renderer in Robo Recall.
Enable ‘Forward Shading’ in the Rendering Project settings and restart the editor to use the Forward Renderer.
To use MSAA, set the default Anti-Aliasing Method in the Rendering Project settings.
Temporal Anti-Aliasing works well at reducing flickering and jaggy edges on 2d monitors, but introduces unwanted blurriness with VR headsets due to the low effective resolution, and the constant sub-pixel movement introduced by head tracking. MSAA gives much sharper results, but requires all shading to be done in one forward pass to be performant.
The console variable ‘r.MSAACount’ controls how many MSAA samples are computed for every pixel. ‘r.MSAACount 1’ has special meaning and falls back to Temporal AA, which allows for convenient toggling between Anti-Aliasing methods.
Performance and Features
Profiling Robo Recall on an Nvidia 970 GTX, the Forward Renderer is 22% faster than the default Deferred Renderer (12.3ms -> 9.6ms).
Most of the performance improvement comes from features that are disabled by default in the Forward Renderer. Only the nearest Reflection Capture will be applied without parallax correction, unless the material opts-in to High Quality Reflections. Similarly Planar Reflection receiving must be enabled on materials and Height Fog is computed per-vertex.
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, shading 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.
Supported Features, which are all used in Robo Recall:
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
Precomputed lighting and skylights
Unshadowed Movable Lights
Instanced Stereo compatible
This is a new rendering path so there may be some issues.
Not yet supported:
Screen space techniques (SSR, SSAO, Contact Shadows)
Shadow casting Movable Lights
Dynamically shadowed translucency
Translucency receiving environment shadows from a Stationary light
Light functions and IES profiles
Additionally, certain features do not handle MSAA properly yet and may exhibit artifacts along object edges. These are DBuffer Decals, Dynamic shadows and Capsule Shadows.