Unity developers will soon be able to use the renderer used by Valve in its HTC Vive title The Lab in their own virtual reality games.
Valve’s Chet Faliszek announced onstage at this year’s Unite Europe that the tool would be released for free download to creators via SteamVR.
The renderer will include full source code and is extensible to use.
The Lab is a collection of virtual reality mini-games developed in-house at Valve for the HTC Vive headset, and was created using Unity, rather than Valve’s internal Source engine.
“We used Unity to make the Lab and we have a new renderer we created for that that helps with lights and shadows, so we thought those were the most important things,” Faliszek explained.
“That’ll help. That’s one of the reasons we wanted to work in Unity, so that people can have that experience.”
Reddit user ccsander explained some of the Lab renderer’s benefits, stating: “Valve has been claiming 2x performance over Unity's renderer, although Unity has made huge strides in their own renderer in 5.4 beta since the time of this claim.
“Valve's renderer can do 10 directional/spot/point lights in a single render pass, where Unity can do 1 directional light plus 4 vertex (lower quality) lights in 1st pass, followed by additional pass for each additional directional/spot/point light. So this alone should really help with scenes with multiple dynamic lights, which I have found is quite necessary for the best look in VR if you have a dynamic scene.
“Other improvements appear to be 8K shadow textures, where Unity was limited to 4K. They also talked about better anti-aliasing and a special dithering technique to improve image quality.”
According to Faliszek, the download link for the Lab renderer will be made available on the SteamVR website later today (June 1st).
UPDATE: Valve has now posted an official announcement for the release of the Lab renderer on its SteamVR blog.
The company's Aaron Leiby noted that the tool includes support for single-pass forward rendering and MSAA, adaptive quality, custom shaders and GPU flushing.
"Unity’s default forward renderer is multi-pass where geometry is rendered an additional time for each runtime spotlight or point light that lights each object," he clarified. "The Lab’s renderer supports up to 18 dynamic, shadowing lights in a single forward pass.
"Adaptive quality is a method for dynamically changing rendering fidelity to maintain framerate without having to rely on reprojection methods that can cause judder and other visual artifacts. The parameters to the adaptive quality algorithm are fully customisable per map.
"One of the least-known performance tricks in VR rendering is to flush the rendering API at a granularity that ensures the GPU is fed often enough to keep busy and avoid bubbles. This plugin calls Unity’s GL.Flush() in the main camera’s OnPostRender() and after shadow rendering for a total of up to three times per frame. This is critical for ensuring the GPU is receiving the draw calls that are being queued in the DirectX runtime in a timely manner.
"The plugin requires that all materials use The Lab’s shaders. If you have a mixture of Unity shaders and The Lab shaders, Unity will render shadows multiple times, which will cost perf. There are menu options under Valve->ShaderDev to help you convert your existing materials to use The Lab’s shaders."