VR: Valves approach "The Lab" vs. Unity 5.5, 5.6 etc.

Hi there,
I´m trying to figure out how to get the best visual experience out of unity when targeting VR.

A year ago valve published “The Lab Renderer” for unity. Back then, they pointed out the biggest issues of developing VR (performance, aliasing etc.) and made solutions for this problems. The Lab Renderer.

I watched the GDC talks (2015 and 2016) of Alex Vlachos from Valve, where he talks in detail about these problems and the solutions valve came up with. Very interesting. The Lab Renderer did a very good job, antialiasing is awesome! The Lab Renderer was developed for Unity 5.4 and Valve is not updating anymore. As I read in the forum, with Unity 5.5 and now 5.6 the Lab Renderer is more and more unusable.

We developed our last VR demo with Unity 5.5 and even with 8x MSAA the flickering coming from the aliasing was really bad in VR. We tried optimizing it but it looks like Unity has some in depth problems (like screen space direct shadows cause aliasing).

So there is the option to stick with the Lab Renderer and Unity 5.4x or maybe 5.5 - but then we can`t take advantage of new features / bug fixes etc. from unity. Or we can stay close to the latest version, but the question is: Is Unity going to use the stuff valve did and update their Renderer? I just read something about the scriptable render pipeline which looks like a big game changer - but who knows when this will be ready for production ? And with which solution do we stick in the meanwhile?

Excited to hear your opinion on this!
Regards,
Mario

https://forum.unity3d.com/threads/fixing-screen-space-directional-shadows-and-anti-aliasing.379902/
This is my semi-hacky, but surprisingly effective solution. We shipped Wayward Sky on the PS4 with this technique, and will be shipping Dino Frontier with it as well unless I get around to replacing Unity’s directional shadows (which is unlikely).

The trick is putting the depth test code into AutoLight.cginc. For our projects we’re using custom shaders, or at least modifications of the default, so just putting the cginc file in the same shader folder works, but you might need to replace the one in the editor folder.

For other effects that use the depth texture there’s not really anything you can do but try to avoid using them, or accept the aliasing / use super sampling (using https://docs.unity3d.com/ScriptReference/VR.VRSettings-renderScale.html ).

With 5.6 or 2017 you can try looking at Unity’s scriptable render loops HD Renderer.
https://github.com/Unity-Technologies/ScriptableRenderLoop

The Lab Renderer seems like it’s perennially in a state of semi-brokenness when running any version of Unity but the specific build it was originally release for. :frowning:

Hi bgolus,
nice, thanks for the info! I will try your solution!
The sciptable render thing looks promising but its to risky for me to use this in a production environment + I am pretty much a noob on this area. So it looks like there is no best option out there right now, right? I mean unless you have a talented coder in your team that can work on custom solutions, you have to live with the aliasing problems, dont use effects that use the depth texture or use super sampling which is expensive.