Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

bioshock-vr

A native VR mod for BioShock Remastered, BioShock 2 Remastered and BioShock Infinite (PC, Steam): stereoscopic rendering, 6DOF head tracking, and motion controllers - weapons in one hand, plasmids/vigors in the other - targeting Quest 3 via Virtual Desktop (VDXR/OpenXR), any other OpenXR runtime with a 32-bit loader path, and SteamVR / Steam Link through the bundled compatibility shim (SteamVR has no 32-bit OpenXR runtime of its own; the zip ships bvr_steamvr32.dll + openvr_api.dll and the mod falls back to them automatically - covers Index, Vive, WMR and Steam Link; see docs/TROUBLESHOOTING.md).

One zip serves all three games - the same DLL set adapts to whichever game it is dropped into:

gameinstall folder (under steamapps\common\)status
BioShock RemasteredBioShock Remastered\Build\Final\playable, tuned
BioShock 2 RemasteredBioShock 2 Remastered\Build\Final\playable, tuned
BioShock InfiniteBioShock Infinite\Binaries\Win32\early access - playable start to current test point; see the release notes for known issues

The mod is a DLL injected into the game's process. It hooks the game's DirectX 11 renderer and the Vengeance engine (Unreal Engine 2.5 lineage) camera path, and drives them from an OpenXR session. No game files are modified and no game assets are distributed.

Status: playable. Working today: full-rate stereo rendering, 6DOF head tracking, motion-controller aim with a laser (right hand = weapons, left hand = plasmids), the visible viewmodel following the controller with the inactive hand hidden, per-weapon aim profiles (every weapon keeps its own laser calibration and swaps it in the moment you equip it), body-follows-head movement ("walk where you look"), the game HUD (health/EVE/ammo - and the pause menu) on a readable floating panel in VR, VR-standard controller bindings with ammo-select on the right stick, a single-eye desktop mirror, and in-headset tuning sliders that persist. The shipped defaults ARE a full calibration (aim trims, per-weapon profiles, body follow) tuned in-headset on a Quest 3. See docs/STATUS.md for the current state and docs/ROADMAP.md for what is next.

Requirements

  • BioShock Remastered on Steam (steamapps\common\BioShock Remastered)
  • A PCVR-capable headset. Primary target: Meta Quest 3 with Virtual Desktop (VDXR); Meta Link/Air Link (Oculus runtime) also ships a 32-bit runtime. Any OpenXR runtime with a 32-bit loader path works natively; SteamVR-only setups (Index, Vive, WMR, Steam Link) work through the bundled shim - install all four DLLs and it engages automatically (docs/TROUBLESHOOTING.md has the details; Quest+VDXR stays the most-tested lane, WMR bindings are unverified on hardware)

Install (release zip)

  1. Download the release zip and copy the DLLs (xinput1_3.dll, bioshockvr.dll, and - for SteamVR setups - bvr_steamvr32.dll + openvr_api.dll) into the game's binary folder: ...\steamapps\common\BioShock Remastered\Build\Final\
  2. If you use itsloopyo's head-tracking mod, remove or back up its xinput1_3.dll first - the two mods use the same injection vector and cannot coexist.
  3. Headset side (Quest 3 + Virtual Desktop): in Virtual Desktop's Streaming tab set the OpenXR runtime to VDXR, connect, then launch the game from Steam inside Virtual Desktop. (On Steam Link or a SteamVR-native headset just launch with SteamVR running - the mod falls back to the bundled SteamVR shim by itself; see docs/TROUBLESHOOTING.md if anything reports "no OpenXR runtime".) Set the game's resolution to roughly SQUARE, not 16:9 - something like 2700x2700. The mod sizes the eye render target from the game's backbuffer, and headset panels are near square, so a 16:9 backbuffer renders a wide strip that the headset then throws away. At 3840x2160 on a Quest 2 only ~54% of the width is inside the FOV: a square 2750x2850 has fewer total pixels, is sharper in the headset, and runs faster. The startup log prints the consequence - xr: headset fov half-angles ... -> game hfov N deg (aspect A); the closer aspect is to 1.0, the less you are wasting.
  4. Launch the game through Steam. The mod logs to %LOCALAPPDATA%\BioshockVR\bioshockvr.log.

To uninstall, delete the mod's DLLs (restore itsloopyo's backup if you made one).

Troubleshooting

docs/TROUBLESHOOTING.md covers every "no VR / flat mode" report received so far: the 32-bit OpenXR registry key (and how to fix it per runtime), broken 32-bit API layers (ReShade and friends - and OBS, which several users had to close or remove), the bundled SteamVR shim (how the automatic fallback works, its log, the xr.ini override, controller coverage), the XR_RUNTIME_JSON override, and per-game resolution/windowed-mode guidance. The release zip ships the same text as TROUBLESHOOTING.txt.

Two symptoms are easy to confuse, so start by telling them apart: if the log shows no OpenXR runtime, that is the runtime/registry side above. If VR starts fine but the game is a flat floating screen with no head tracking, that is a saved vrpreset.ini with stereo and head-drive switched off - copy the matching preset-* file from the zip over yours, or arm it in F10 (see the "flat floating screen" section).

If it crashes or misbehaves: clear your settings first

The mod's saved settings live in %LOCALAPPDATA%\BioshockVR\ (paste that into the Explorer address bar). Close the game, then delete or move vrpreset.ini, hands.ini, weapons.ini and command.txt if present, and relaunch.

Those files override the built-in defaults key by key, so a value written by an older version - or one saved mid-experiment - keeps applying even after an update fixes the default. Clearing them puts you back on the shipped defaults, which are the ones that get tested. You only lose your own tuning, and pressing VR PRESET 1 restores a working configuration immediately.

Keep bioshockvr.log from the same folder if you want to report the problem; crash dumps, when there are any, land in %LOCALAPPDATA%\BioshockVR\crash\.

Playing in VR

  1. Launch the game - VR arms itself automatically (your saved settings load and the full stack - pacing, 6DOF camera, motion controllers, aim + laser, viewmodel drive, body-follows-head, stereo - comes up with no F10 trip). To opt out: untick "Auto-start VR at launch" in the F10 preset block and save, or set autoVr=0 in vrpreset.ini with the game closed.
  2. The F10 overlay is still there for tuning, and VR PRESET 1 (BS1) / APPLY PRESET (BS2) re-arms everything on demand. No restart is ever needed - the mod answers the game's one-shot startup gamepad check itself, so the motion controllers engage immediately, first launch included.
  3. Click both thumbsticks together to reset the view (same as the F10 recenter button) - do it standing in your neutral pose, facing forward.
  4. Quest 3 Touch controls:
InputAction
Swing your right handswing the wrench - only while the wrench is equipped; the trigger still works too
Right triggerfire weapon (first pull raises it)
Left triggercast plasmid (first pull raises it)
Right gripswitch/cycle weapon (hold for the radial)
Left gripswitch/cycle plasmid (hold for the radial)
Left stickmove (crouch on click)
Right stickturn; hold the LEFT thumbrest + push up/down/left = select ammo type (zoom is removed in VR)
Left thumbrestammo-select modifier (the pad above the X/Y buttons - just rest your thumb on it)
Ause / interact (and menu confirm)
Bjump
Xreload / hack / inject EVE
Yfirst-aid kit
Left menu buttonpause (hold: map/objectives)
X + Y togethersame as the menu button (use it when Steam Link's overlay eats the real one)

Under VR the right stick no longer pitches the view (your head does); vrinput pitchkill off restores stick pitch if you want it back.

Ammo select used to mean holding the right stick click while pushing that same stick, which is awkward. It is now the left thumbrest - the smooth pad above the X/Y buttons, which senses your thumb resting on it. It has to be the left one: your right thumb cannot rest on the right pad and push the right stick at the same time. The overlay's "Ammo-select modifier" combo (or vrinput ammomod click|thumbrest|both) switches back to the stick click, or accepts either. Controllers with no thumbrest (Pico, some SteamVR setups) keep the stick click automatically.

Tuning (all in the overlay, all persisted by "Save preset values" / vrpreset save):

  • World scale / IPD / game FOV - comfort and scale calibration
  • Per-hand aim trim (up to +-90 deg) - laser/bullet direction alignment per hand
  • Per-weapon profiles - the right hand's aim trim + ray offsets automatically follow the EQUIPPED weapon: tune with a weapon up and only that weapon's profile changes, swapped in the moment you switch. Calibration flow: fire at a wall, nudge the sliders until the laser sits on the bullet holes, next weapon, then one "Save preset values". The overlay's "weapon profile:" line shows which weapon you are editing.
  • Per-hand ray offsets - the "Ray offset hand: L / R" selector + three sliders move the laser (and the bullets with it - they are one ray) to line up with the controller and model
  • Head anchor offsets - if the camera sits wrong in the body
  • Per-hand model offsets - the "Tuning hand: L / R" selector picks which hand the six position/rotation sliders edit, so the pistol and the plasmid hand are tuned independently
  • Turn controls - "Smooth turn speed" scales the stick turn rate; "Snap turn" replaces smooth turning with discrete steps (angle slider, default 45 deg)
  • Cinematics - scripted scenes (the bathysphere descent), the hack minigame, loading screens and FMVs are auto-detected. Cutscenes play as a full stereo projection with head-look by default; untick "Cinematics as stereo projection" to watch them on a big virtual screen instead. Flat 2D screens (hacking, loading) always use the readable screen.
  • Cutscene black bars are gone ("Hide cutscene black bars", on by default). The game's widescreen bars are a flash sprite drawn over the full picture, so hiding them reveals the image that was always underneath - nothing is cropped, stretched or lost.
  • What the rig does during a cutscene - the "During cutscenes" dropdown: authored (default) plays the director's camera and the authored hand animation exactly as the flat game does; authored + head look keeps the choreography but lets you look around; off leaves your head and hands driving straight through the scene.
  • Cutscene subtitles ride the head-locked panel so they stay readable in stereo. The "Cutscene subtitles in-frame" checkbox puts them back in the world if you prefer.
  • Swing to attack ("Swing the wrench to attack", on by default) - a fast right-hand motion swings the wrench, in addition to the trigger. Only while the wrench is equipped: the gesture composes a trigger pull, and a trigger pull with a gun in hand is a shot, so it is gated on what you are actually holding. "Swing speed needed" (3.6 m/s) is the bar your hand has to clear - lower it if swings are being missed, raise it if ordinary movement triggers one. Note it changes when the attack fires, not where it lands: the game aims melee from your view, so a sideways swing while you look forward still hits forward, exactly as the trigger always did.
  • Aim dot ("Aim dot", off by default) - a single dot on the ray the bullet actually uses, not a reconstruction of it, so where the dot sits is where the shot goes. Set "aim dot distance" to roughly your calibration wall's distance before tuning: a dot and a bullet hole only line up in stereo when they are at the same depth.
  • vrbody off - live A/B for the body-follows-head transfer (instant 1:1 by default)

The bundled preset (v0.3.0+)

A fresh install needs no tuning: the shipped defaults are a complete in-headset calibration (left/plasmid hand trim, per-weapon profiles for all eight holdables, body follow, HUD placement). Just install and press VR PRESET 1.

The release zip also carries the same calibration as plain files (vrpreset.ini, hands.ini, weapons.ini):

  • New users: nothing to do - the DLL defaults are identical to these files.
  • Existing users with their own tuning: your files in %LOCALAPPDATA%\BioshockVR\ ALWAYS win over the built-in defaults, key by key - updating the DLLs changes nothing you tuned. To adopt the bundled calibration instead, back up and delete (or overwrite) those three files in %LOCALAPPDATA%\BioshockVR\ and restart the game. To adopt only parts (say, the weapon profiles but not your world scale), copy just that one file - or even single lines: every key=value line stands alone.

The flat-screen crosshair is hidden by default (the laser replaces it); the "Flat-screen crosshair" checkbox or vrxhair on brings it back.

The game HUD (health, EVE, ammo - and the pause menu) shows on a head-locked floating panel during stereo gameplay; "HUD distance/width/height offset" sliders place it, vrhud off disables the capture entirely, and the inactive hand's model is hidden while the other hand is raised (vrhands hideinactive off shows both).

The desktop window mirrors the left eye while stereo runs (vrmirror off restores the raw alternating view), and the game keeps running at full speed on the monitor when you take the headset off (vrpace off restores the old blocking behavior).

Build from source

git clone --recursive https://github.com/mohamad-balouza/bioshock-vr
cd bioshock-vr
.\tools\build.ps1            # Debug build (finds the VS-bundled CMake automatically)
.\tools\build.ps1 -Release   # Release build
.\tools\install.ps1          # copies the mod DLLs into the game's Build\Final folder
.\tools\uninstall.ps1        # removes them (restores anything it backed up)

Building needs Visual Studio 2022 Build Tools with the x86 MSVC toolset (the game is 32-bit) and git. .\tools\tail-log.ps1 follows the log live.

Legal

This project is not affiliated with, endorsed by, or connected to 2K Games, Take-Two Interactive, or any of their subsidiaries. It distributes no game assets, no decompiled game code, and no copyrighted material - only original injection code. A legitimately owned copy of BioShock Remastered is required. Free and open source, forever.

Credits

  • itsloopyo/bioshock-remastered-headtracking (MIT) - pioneered the xinput1_3.dll injection vector and the PlayerCalcView camera hook technique on this exact game; this project ports and extends those techniques.
  • praydog/REFramework (MIT) - reference implementation for OpenXR/D3D11 VR integration in a closed-source engine.
  • BioVRDev/Bioshock-Remastered-VR - a parallel native VR mod for the same game, and a genuinely friendly one. The two projects have swapped findings in both directions: their README credits this one for the reticle-via-console-Exec technique, the arm bone indices and the render-target HUD capture, and their author has given explicit permission to reuse their code and concepts here. Ideas taken from them so far: rendering at a near-square resolution matched to the headset panel instead of widening the game's FOV, the "report the game's own symmetric FOV to the compositor, never the headset's canted one" invariant, per-feature build guarding that logs and stands down instead of trusting an address, and the startup config echo block. Files that adapt their code carry an attribution comment naming the source. Worth a look, and worth trying if this mod does not suit your setup.
  • Third-party libraries: see THIRD_PARTY_NOTICES.md.

License

MIT

关于 About

Native VR mod for BioShock Remastered: stereo rendering, 6DOF, motion controllers (OpenXR)

语言 Languages

C++94.2%
PowerShell4.8%
Python0.6%
CMake0.4%
C0.0%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
645
Total Commits
峰值: 255次/周
Less
More

核心贡献者 Contributors