It's best to subscribe to this mod directly on the Workshop to avoid missing updates.
Click here to go to L4D2VR's Workshop page
- Singleplayer and multiplayer
- 6DoF VR view
- Full controllers two-handed interaction
- Desktop mirror
- Workshop content
- ReShade
- Multi-core rendering (Enable in VR Config Menu, not the game's video settings menu)
- Anti-aliasing (Enable in VR Config Menu, not the game's video settings menu)
- Interactions and throwables require you to aim with your face. (Except for VR-only servers)
- You can join any server to play, but if the server wasn't created by VR, you will only have some VR-exclusive features.
- Versus works, but it's barely been tested.
- Download L4D2VR.zip and extract the files to your Left 4 Dead 2 installation directory at:
steamapps/common/Left 4 Dead 2- You can also access the installation directory by right-clicking Left 4 Dead 2 in Steam and going to: Manage > Browse local files
- Launch SteamVR, then launch Left 4 Dead 2 with these launch options:
-heapsize 524288 -processheap -high -novid -windowed- If you use a desktop client resolution of 2k or higher, add
-bigfontsto the launch options to make in-game text larger; otherwise, the text on the HUD will be very small.
- If you use a desktop client resolution of 2k or higher, add
- Join or create your campaign and enjoy the game.
- To recenter the camera height, press down on the left stick. To see the HUD, aim the left controller up or down.
- Start the game and get to the level.
- Press the left controller Y button to open the pause menu.
- The VR Config button will appear at the top right of the pause menu.
- Click to open the L4D2VR Config Panel.
- Change the settings and press the Save button to save, or press the Reload button to undo all changes.
- Download ReShade.
- Select the rendering API Left 4 Dead 2 uses: Vulkan + OpenXR.
Optional: Select effects to install: VRToolkit by retroluxfilm.
- Disable SteamVR theater in SteamVR settings
- L4D2VR uses a custom
d3d9.dllbased on DXVK. Even though the error says D3D, the failure is often the Vulkan backend failing to initialize. - Update the GPU driver from NVIDIA, AMD, or Intel. Windows Update drivers are often too old for DXVK 2.x.
- Make sure the GPU and driver support Vulkan 1.3. Very old GPUs and some virtual/remote desktop display adapters will not work.
- Do not launch the Steam "Vulkan" launch option and do not add
-vulkan. Launch the normal DirectX 9 game with the L4D2VR files installed. - Remove forced display launch options such as
-w,-h,-fullscreen, or unusual refresh-rate settings, then try windowed/default video settings. - Check
left4dead2_d3d9.lognext toleft4dead2.exe; lines such as "No adapters found" or "A Vulkan 1.3 capable driver is required" indicate a driver/GPU support problem.
- Steam Settings > Downloads > Shader Pre-Caching > Allow background processing of Vulkan shaders.
The bundled DXVK 2.6.1 includes a source port from DXVK-GPLALL 2.6.1-6:
- Asynchronous graphics-pipeline compilation is enabled by default. Set
DXVK_ASYNC=0, ordxvk.enableAsync = Falseindxvk.conf, to disable it if a newly encountered shader causes temporary missing draws or other visual problems. - GPL/Async state-cache integration is enabled by default. It can be disabled
with
DXVK_GPLASYNCCACHE=0ordxvk.gplAsyncCache = False. - Low-latency frame pacing is enabled by default. Select
max-frame-latency,low-latency, ormin-latencywithDXVK_FRAME_PACE, or the matchingdxvk.framePacevalue. Fine tuning is available throughDXVK_LOW_LATENCY_OFFSETandDXVK_LOW_LATENCY_ALLOW_CPU_FRAMES_OVERLAP; seedxvk_new/dxvk.conf. - A per-game
dxvk.confnext toleft4dead2.exetakes priority over the optional global%APPDATA%/dxvk.conf.
The frame pacer controls DXVK's D3D9 CPU/GPU and desktop-present scheduling. It complements, but does not replace, SteamVR compositor timing or reprojection. Async compilation originates from work by jomihaka and Sporif, GPL/Async integration from Ph42oN, and low-latency frame pacing from netborg-afps.
- Try lowering the game's video settings.
- Disabling all add-ons, then verifying integrity of game files:
- Steam > Left 4 Dead 2 > Properties > Installed Files > Verify integrity of game files.
- Re-installing the game.
If you want to return to normal game mode with no VR, there are two methods:
- Method 1: Add the launch option:
-nohmd. - Method 2: Find
d3d9.dllin the game root directory and rename it or move it somewhere else. After launching the game, open the console and entercrosshair 1to enable the crosshair again, since L4D2VR disables it.
I still recommend keeping d3d9.dll, because it can also be used as DXVK for non-VR mode.
git clone --recurse-submodules https://github.com/keyou91/l4d2vr.git- Initialize submodules:
git submodule update --init --recursive
- Install DirectX SDK: request DirectX Headers and Libs
- Run the fixed build script (locks target to
Release|x86):or:.\build_release_x86.ps1
build_release_x86.cmd
- (Optional/manual) Open l4d2vr.sln and build
Release|x86.
Note: After building, it will attempt to copy the new d3d9.dll to
steamapps/common/Left 4 Dead 2. The pose relay is produced asRelease/l4d2vr_pose_server.dll; copy it andL4D2VR/l4d2vr_pose_server.vdfto the server'sleft4dead2/addonsdirectory.
For quick vtable inspection, use Asherkin's VTable Dumper.
It can be used for server.dll-side symbols and also for engine.dll targets (drop the binary and search symbol names like bob, viewmodel, etc.).