I've been wanting to familiarize myself with VR development for a while, and I thought it would be nice to convert an existing (open source) game as an exercise. I picked The Dark Mod, because given that there are already two VR mods for Doom3 out there, it seemed like an obvious choice for some learning-by-copying. Of course, that was before I realized that The Dark Mod is based on an older engine version and that there have been some significant changes to the renderer
Anyway, I still went forward, and I got basic stereoscopic rendering and headtracking working, so I wanted to share my progress with you. Before I get your hopes up, this is nowhere near the two Doom3 VR mods. In fact, stereo rendering and headtracking is pretty much all you get right now, so it's only suitable as a seated experience, and even then it's more a preview than something actually playable.
I had to make a few changes to the renderer, specifically I added very basic FBO support to render to the two required eye textures. The most significant challenge I faced was performance, though. VR needs consistent 90fps times two across the board, and I struggled with getting that on my 3 years old Core i5. In the end, I had to put the game tics and frontend drawing on a separate thread to run parallel with the backend, because otherwise performance was just not stable enough. This turned out to be a major pain in the ass, because even though the engine might originally have been designed to run in parallel like that, there were still hidden interactions leading to race conditions and memory leaks. No guarantees I got them all, too - it seems to run pretty stable now, but the great thing about race conditions is you never know when they'll strike
Anyway, if you want to try it out, you can find a first early release here: https://github.com/f...er/thedarkmodvr
Please note that all GUI elements will still render 2D (I haven't gotten around to adapting them yet), so GUI and HUD are not usable in the headset. Please remember to set your seated position in SteamVR. Also, given that this still uses keyboard and mouse movement, you need some serious VR legs for this, so please be careful - there are no comfort options right now.
Going forward, my plans are first and foremost to adapt GUI elements, so that we get at least a usable seated VR experience. There's also some bug with shadow drawing, where some shadows are rendered inconsistently between the left and right eye, which leads to annoying graphical artefacts. I do of course dream about a full-on roomscale conversion, but that is going to be a lot of work, and I don't know how much time I can really invest. So I don't want to make any promises.
Finally, even if you are not interested in VR, but you have some weaker hardware, this exe might still give you a slight performance increase due to the threaded renderer.