Behind the Tech
Speaking to the team behind the Half-Life 2: VR mod, we learned more about the technical issues which halted development of the original mod several years back. Two of the new members—who go by pseudonyms Marulu and Street Rat—are responsible for developing a key hack that would make it possible to bring Half-Life 2 to modern VR headsets.
“The Source engine is DirectX 9 only which does not allow texture sharing and is not supported by any of the new VR APIs [which the modern VR headsets rely on],” Marulu told me. “Oculus and SteamVR both need DirectX 10+. Valve thus abandoned [VR support in Source] and left it in the [Rift] DK2 ‘extended’ state based on a old SteamVR version.”
That meant that official VR support in Source-based games like Half-Life 2 never made the jump to the consumer Vive and Rift headsets. That is until Marulu developed a technique to send frames directly to the new VR APIs; a hack which he teases was actually developed for another “secret project” that hasn’t yet been announced.
“We hacked that support to gain control over it and using my special rendering code I send the DirectX frames in low latency directly to the VR SDKs. It should be as low latency as native DirectX 11 rendering. This code was developed by me for my secret project, which will launch soon, and was reused for the Half-Life 2: VR mod.”
Remastered
Speaking with WormSlayer, a long-time member of the VR community, and one of the authors of the original mod, I learned how Half-Life 2: VR has been remastered—in many cases hand-tuned across some 90 maps for increased fidelity—over the course of two years.
“After Half-Life 2 was released [in 2004], [Valve] added a bunch of new features to the engine, like HDR lighting, which were used in the Episodes,” he explained. “So I updated all of the levels to use that, and some other features like accurate shadows from static meshes, and also went through and hand-optimised the resolution of the shadow maps everywhere. I fixed countless misaligned textures, little gaps in the level geometry, etc.”
Episode 1 & 2 on the Way
Although Episode 1 and 2 are required for the installation (because of some shared assets), the initial release of the mod will launch only with compatibility for the full Half-Life 2 campaign. The team has confirmed that Episode 1 and Episode 2 are due to get the same VR treatment. They’re also considering multiplayer/co-op support but haven’t committed to delivering that just yet.