github liper76/TWFC-VR v1.0.4
TWFC-VR 1.0.4 (half-black view fix, OpenXR -32 bypass, Meta Link crash fixes, PSVR2 L+R stick)

one hour ago

English · Русский ниже

Fixes

  • OpenXR error -32 (XR_ERROR_FILE_ACCESS_ERROR) on all 32-bit runtimes (#1): broken or stale 32-bit implicit OpenXR API layers in WOW6432Node\Khronos\OpenXR\1\ApiLayers\Implicit could cause xrCreateInstance to fail with -32 on Virtual Desktop, Oculus/Meta Link, and SteamVR alike. The mod now logs OpenXR loader diagnostics (XR_LOADER_DEBUG=warn) and, if all runtimes fail with a layer/file-access error, automatically retries for this game process with 32-bit implicit API layers bypassed (never modifying Windows' registry). Also adds Meta's newer Meta Horizon\Support\oculus-runtime\oculus_openxr_32.json path.
  • Half-black / cut-off VR view in missions and world warping / misaligned aim on 1080p/1440p/1600p monitors (#3, Discord):
    • Root cause fixed (focus.cpp): during startup TWFC.exe (0x116BA764) replaced the window's GWL_WNDPROC, removing the mod's WM_GETMINMAXINFO/WM_WINDOWPOSCHANGING hook. On any monitor shorter than the square VR render size (e.g. 1080p → ~1040 px, 1600p → 1520 px), Windows clamped the window height, UE3 shrunk its viewport via WM_SIZE/GetClientRect, and rendered only the top rectangle inside the square backbuffer — leaving the bottom half solid black and shifting the projection center upward ("watching from below", world warping, aim below hits). The mod now hooks SetWindowLongW/A and SetWindowPos/MoveWindow so GameWndProc stays on top and the window/viewport stays at full RenderWidth x RenderHeight.
    • Native OpenXR eye FOV and pose reprojection: xrEndFrame now always receives the headset's exact unmodified views[i].fov and views[i].pose from xrLocateViews, while the blit shader reprojects UE3's levelled symmetric render (and in-eye HUD markers) into the headset's native asymmetric frustum and head roll.
    • D3D11 backbuffer capture & HUD splitting under SteamVR/Oculus: dynamically hooks all D3D11 immediate-context vtable transitions (T0 -> T1 -> T2 in-place slot rewrites when ID3D10Multithread::SetMultithreadProtected(TRUE) is enabled by SteamVR, Oculus, or the mod) so backbuffer capture and HUD splitting never silently stop working. Also stays active with FloatingHud=0, supports >16 render targets per frame and MSAA (ResolveSubresource), and clears bConstrainAspectRatio in AFR (StereoPerFrame=0).
  • Meta Quest Link launch crash on the Steam version (#3): guards all D3D11 immediate-context hooks against runtime/mod own calls (g_d3dOwnCalls), enables D3D11 multithread protection, reuses a single deferred context for blitting, validates swapchain RTVs, and automatically caps render size (1800x1800) and texture pool (384 MB) on 2 GB non-LAA processes (Steam's DRM-wrapped TWFC.exe).
  • PSVR2 / SteamVR & other controllers (#2): holding both stick clicks (LClick + RClick) for 0.8 s in gameplay now opens/closes the VR settings menu without needing a menu button. Fixed F2/Esc focus detection (FocusIsRealForeground / active VR session) and added microsoft/motion_controller and khr/simple_controller OpenXR binding profiles.

Which installer: TWFC-VR-Setup-Steam.exe for the Steam version, TWFC-VR-Setup.exe for the other PC versions.

Verified on MockXR (clean mission stereo rendering, full backbuffer capture when the desktop window is smaller, native asymmetric FOV + roll reprojection, and LClick + RClick VR settings menu). Not yet tested on a real Steam build, Meta Quest Link, Quest 3S SteamVR, or PSVR2 headset on our side — if something is still off, please attach BinariesVR\twfcvr.log to an issue.

Install and controls: see v1.0.


Русский

Исправления

  • Ошибка OpenXR -32 (XR_ERROR_FILE_ACCESS_ERROR) на всех 32-битных рантаймах (#1): сломанные или устаревшие 32-битные неявные API-слои OpenXR в WOW6432Node\Khronos\OpenXR\1\ApiLayers\Implicit могли ронять xrCreateInstance с кодом -32 одновременно в Virtual Desktop, Oculus/Meta Link и SteamVR. Теперь мод пишет диагностику загрузчика OpenXR (XR_LOADER_DEBUG=warn) в лог и при ошибке слоя автоматически повторяет запуск только для процесса игры в обход 32-битных неявных слоёв (реестр Windows не трогается). Также добавлен новый путь Meta Horizon\Support\oculus-runtime\oculus_openxr_32.json.
  • Чёрная нижняя половина VR-обзора в миссиях, искажение мира при движении и смещённый прицел на мониторах 1080p/1440p/1600p (#3, Discord):
    • Исправлена первопричина (focus.cpp): при запуске TWFC.exe (0x116BA764) перезаписывал GWL_WNDPROC окна, снося наш обработчик WM_GETMINMAXINFO/WM_WINDOWPOSCHANGING. На любом мониторе ниже квадратного VR-рендера (1080p → ~1040 px, 1600p → 1520 px) Windows сжимала окно по высоте, UE3 через WM_SIZE/GetClientRect урезал свой вьюпорт и рисовал сцену только в верхнюю часть квадратного бэкбуфера — оставляя нижнюю половину сплошной чёрной и задирая центр проекции вверх («как будто смотрю снизу», искажение мира, прицел ниже попаданий). Теперь мод перехватывает SetWindowLongW/A и SetWindowPos/MoveWindow, удерживая GameWndProc сверху и полный размер окна/вьюпорта RenderWidth x RenderHeight.
    • Нативный FOV и поза глаз в OpenXR: в xrEndFrame теперь всегда передаются точные немодифицированные views[i].fov и views[i].pose из xrLocateViews, а шейдер делает точную репроекцию выровненного рендера UE3 (и меток HUD в глазах) в родной асимметричный FOV шлема и крен головы.
    • Захват бэкбуфера и разделение HUD под SteamVR/Oculus: динамически перехватываются все состояния таблицы D3D11 immediate context (включая in-place перезапись слотов T0 -> T1 -> T2 при включении ID3D10Multithread::SetMultithreadProtected(TRUE) со стороны SteamVR, Oculus или мода), поэтому захват бэкбуфера и разделение HUD больше не отключаются. Захват работает и при FloatingHud=0, поддерживает >16 рендер-таргетов за кадр и MSAA (ResolveSubresource), а bConstrainAspectRatio сбрасывается также и в AFR (StereoPerFrame=0).
  • Вылет Steam-версии на старте с Meta Quest Link (#3): все хуки D3D11 защищены флагом g_d3dOwnCalls, включена многопоточная защита D3D11, переиспользуется один deferred context, добавлена проверка RTV сцепки, а на 2 ГБ процессе без флага LAA (Steam-exe с DRM) автоматически ограничиваются размер рендера (1800x1800) и пул текстур (384 МБ).
  • PSVR2 / SteamVR и другие контроллеры (#2): удержание обоих кликов стиков (LClick + RClick, 0.8 с) в бою открывает и закрывает меню настроек VR без кнопки меню. Исправлена проверка фокуса для F2/Esc, добавлены профили привязок microsoft/motion_controller и khr/simple_controller.

Какой установщик: TWFC-VR-Setup-Steam.exe — для Steam-версии, TWFC-VR-Setup.exe — для остальных PC-версий.

Проверено в MockXR (стерео в миссии, захват полного квадратного бэкбуфера при меньшем окне, репроекция нативного асимметричного FOV и крена, открытие меню настроек по LClick + RClick). На реальной Steam-сборке, Meta Quest Link, Quest 3S SteamVR и PSVR2 у нас не проверено — если что-то останется не так, приложите BinariesVR\twfcvr.log к issue.

Установка и управление — см. v1.0.

Don't miss a new TWFC-VR release

NewReleases is sending notifications on new releases.