fholger / vrperfkit

VR Performance Toolkit
Other
1.3k stars 53 forks source link

Oculus mode in Elite Dangerous: no effect? #26

Open Houndmux opened 2 years ago

Houndmux commented 2 years ago

I'm trying to run vperfkit via Oculus on a Pimax. Reason is that some games can be modified to use the Oculus libraries so the game can be run without needing the very resource hungry "enable parallel projections" setting in PiTool. reddit user n4ske created a modified launcher that allows to run ED in Oculus mode for SteamVR-headsets. This works, but the performance is low and I suspect this is because OVR uses a high super resolution setting (image is very clear compared to my SteamVR-optimized variant), basically offsetting the performance gain due to disabled parallel projections. I was hoping that vrperfkit might help boost performance at this high super resolution setting but it seems to have no effect in the game. Hotkeys don't do anything and when I edit the yml to low upscaling factors, no difference can be noticed. According to the logfile, vrperfkit takes control when using OVR:

00:53:32 [19164] ====================== 00:53:32 [19164] VR Performance Toolkit 00:53:32 [19164] ======================

00:53:32 [19164] Setting render scale to minimum value of 0.5 00:53:32 [19164] Current configuration: 00:53:32 [19164] Upscaling (FSR) is enabled 00:53:32 [19164] Render scale: 0.5 00:53:32 [19164] Sharpness: 0.7 00:53:32 [19164] Radius: 0.5 00:53:32 [19164] MIP bias: enabled 00:53:32 [19164] Debug mode is enabled 00:53:32 [19164] Currently active hotkeys: 00:53:32 [19164] cycleUpscalingMethod 17 113 00:53:32 [19164] increaseUpscalingRadius 17 114 00:53:32 [19164] decreaseUpscalingRadius 17 115 00:53:32 [19164] increaseUpscalingSharpness 17 116 00:53:32 [19164] decreaseUpscalingSharpness 17 117 00:53:32 [19164] toggleDebugMode 17 112 00:53:32 [19164] toggleUpscalingApplyMipBias 17 118 00:53:32 [19164] toggleFixedFoveated 18 112 00:53:32 [19164] * captureOutput 17 119 00:53:32 [19164] Installing hook for LoadLibraryA from 00007FFA9C9B04F0 to 00007FFA7600B0A0 00:53:32 [19164] Installing hook for LoadLibraryExA from 00007FFA9C9AFBC0 to 00007FFA7600B0F0 00:53:32 [19164] Installing hook for LoadLibraryW from 00007FFA9C9AFEE0 to 00007FFA7600B1D0 00:53:32 [19164] Installing hook for LoadLibraryExW from 00007FFA9C9AADC0 to 00007FFA7600B160 00:53:32 [19164] d3d11.dll is loaded in the process, installing hooks... 00:53:32 [19164] Installing hook for D3D11CreateDevice from 00007FFA9644FCB0 to 00007FFA75FECBA0 00:53:32 [19164] Installing hook for D3D11CreateDeviceAndSwapChain from 00007FFA9644FE20 to 00007FFA75FED020 00:53:34 [19156] (DEBUG) Redirecting CreateDXGIFactory1 to system 00:53:34 [19156] Loading DLL at "C:\WINDOWS\system32\dxgi.dll"

Any idea why it still has no effect in the game?

fholger commented 2 years ago

See also: https://github.com/fholger/vrperfkit/issues/14

Bottom line: Pimax Oculus emulation is not supported, and I can't make it work without access to Pimax hardware. So unless another developer with Pimax wants to investigate this further, I'm afraid it's not going to happen.

DJSlane commented 2 years ago

I'm interested in the method you're using to run Elite Dangerous at all in oculus with Pimax. I know you said it doesn't work, but I might get lucky trying to do so if I can find the script/method you're using to start in oculus mode instead of steamVR. I looked up n4ske with no luck, and I did find a reddit discussing the use of a server-token passing launcher-bypassing method, but the scripts were 404-not found and were a couple of years old....

DJSlane commented 2 years ago

Got Elite Dangerous working with the Oculus on Pimax - (Thanks @Houndmux!). I get the following error in the log. Is that the same as/for you @Houndmux? I used the dxgi sent to me by fholger a couple of weeks ago.

23:19:04 [5372] ====================== 23:19:04 [5372] VR Performance Toolkit 23:19:04 [5372] ======================

23:19:04 [5372] Current configuration: 23:19:04 [5372] Upscaling (FSR) is enabled 23:19:04 [5372] Render scale: 1 23:19:04 [5372] Sharpness: 1 23:19:04 [5372] Radius: 0.8 23:19:04 [5372] MIP bias: enabled 23:19:04 [5372] Debug mode is disabled 23:19:04 [5372] Currently active hotkeys: 23:19:04 [5372] cycleUpscalingMethod 17 18 113 23:19:04 [5372] increaseUpscalingRadius 17 18 115 23:19:04 [5372] decreaseUpscalingRadius 17 18 114 23:19:04 [5372] increaseUpscalingSharpness 17 18 118 23:19:04 [5372] decreaseUpscalingSharpness 17 18 117 23:19:04 [5372] toggleDebugMode 17 18 112 23:19:04 [5372] toggleUpscalingApplyMipBias 17 18 120 23:19:04 [5372] toggleFixedFoveated 17 18 121 23:19:04 [5372] * captureOutput 17 18 123 23:19:04 [5372] Installing hook for LoadLibraryA from 00007FF83E7404F0 to 00007FF82AECB530 23:19:04 [5372] Installing hook for LoadLibraryExA from 00007FF83E73FBC0 to 00007FF82AECB650 23:19:04 [5372] Installing hook for LoadLibraryW from 00007FF83E73FEE0 to 00007FF82AECB8C0 23:19:04 [5372] Installing hook for LoadLibraryExW from 00007FF83E73ADC0 to 00007FF82AECB780 23:19:04 [5372] d3d11.dll is loaded in the process, installing hooks... 23:19:04 [5372] Installing hook for D3D11CreateDevice from 00007FF838C2FCB0 to 00007FF82AEACBA0 23:19:04 [5372] Installing hook for D3D11CreateDeviceAndSwapChain from 00007FF838C2FE20 to 00007FF82AEAD020 23:19:05 [13708] LibPVRRT64_1_X.dll is loaded in the process, installing hooks... 23:19:05 [13708] Installing hook for ovr_Initialize from 00007FF82AD534F0 to 00007FF82AEAF1D0 23:19:05 [13708] Installing hook for ovr_GetFovTextureSize from 00007FF82AD55450 to 00007FF82AEAF0E0 23:19:05 [13708] Installing hook for ovr_EndFrame from 00007FF82AD55710 to 00007FF82AEAEF60 23:19:05 [13708] Installing hook for ovr_SubmitFrame from 00007FF82AD56A20 to 00007FF82AEAF440 23:19:05 [13708] Installing hook for ovr_SubmitFrame2 from 00007FF82AD56090 to 00007FF82AEAF2C0 23:19:11 [1260] Loading DLL at "C:\WINDOWS\system32\dxgi.dll" 23:19:12 [5500] Oculus runtime initialization for version 4 23:19:16 [1260] Initializing Oculus frame submission... 23:19:16 [1260] Game is using D3D11 swapchains, initializing D3D11 resources 23:19:16 [1260] Swap chain has format 5, bind flags 1 and misc flags 1 23:19:16 [1260] Eye 0: submitted textures have resolution 7932x3968 23:19:16 [1260] Eye 0: output resolution is 7932x3968 23:19:16 [1260] Creating output swapchain in format 5 23:19:16 [1260] (!) ERROR: Failed to create graphics resources: Failed creating output swapchain: 23:19:16 [1260] (!) ERROR: Could not initialize graphics resources; game may be using an unsupported graphics API

DJSlane commented 2 years ago

Also if anyone knows of a way to determine the SS and or resolution from within Oculus with a Pimax I'd love to know. I've tried Oculus Tray Tool and the debug from within the SDK and for the life of me can't get any HUD overlays at all. I still suspect running Oculus without PP would be much much more efficient, but can't compare this apple to the oranges of Steam VR since I have no idea what resolution the Oculus version is even running at.

Houndmux commented 2 years ago

Here's my log (ED Horizons, OVR + vrperfkit, dxgi.dll from january 15). It runs, but performance is worse than in SteamVR. I too did not find a way to set super resolution in this modified OVR version, but I assume adjusting resolution through render quality in PiTool should have the same effect.

09:21:46 [14668] ====================== 09:21:46 [14668] VR Performance Toolkit 09:21:46 [14668] ======================

09:21:46 [14668] Current configuration: 09:21:46 [14668] Upscaling (FSR) is enabled 09:21:46 [14668] Render scale: 0.66 09:21:46 [14668] Sharpness: 0.7 09:21:46 [14668] Radius: 0.3 09:21:46 [14668] MIP bias: enabled 09:21:46 [14668] Debug mode is disabled 09:21:46 [14668] Currently active hotkeys: 09:21:46 [14668] cycleUpscalingMethod 17 113 09:21:46 [14668] increaseUpscalingRadius 17 114 09:21:46 [14668] decreaseUpscalingRadius 17 115 09:21:46 [14668] increaseUpscalingSharpness 17 116 09:21:46 [14668] decreaseUpscalingSharpness 17 117 09:21:46 [14668] toggleDebugMode 17 112 09:21:46 [14668] toggleUpscalingApplyMipBias 17 118 09:21:46 [14668] toggleFixedFoveated 18 112 09:21:46 [14668] * captureOutput 17 119 09:21:46 [14668] Installing hook for LoadLibraryA from 00007FFD773704F0 to 00007FFD4B7CB0A0 09:21:46 [14668] Installing hook for LoadLibraryExA from 00007FFD7736FBC0 to 00007FFD4B7CB0F0 09:21:46 [14668] Installing hook for LoadLibraryW from 00007FFD7736FEE0 to 00007FFD4B7CB1D0 09:21:46 [14668] Installing hook for LoadLibraryExW from 00007FFD7736ADC0 to 00007FFD4B7CB160 09:21:46 [14668] d3d11.dll is loaded in the process, installing hooks... 09:21:46 [14668] Installing hook for D3D11CreateDevice from 00007FFD718CFCB0 to 00007FFD4B7ACBA0 09:21:46 [14668] Installing hook for D3D11CreateDeviceAndSwapChain from 00007FFD718CFE20 to 00007FFD4B7AD020 09:21:49 [15912] Loading DLL at "C:\WINDOWS\system32\dxgi.dll" 09:23:09 [14696] Shutting down

fholger commented 2 years ago

The log clearly shows that the mod is not active. This is expected, because it simply doesn't work with Pimax's Oculus emulation.

DJSlane commented 2 years ago

Yeah I noted it does work quite well, but underperforms SteamVR with PP on - but due to the GPU not being fully utilized! What the heck! It's at like 87-90% and can be at 60fps. CPU is not bottlenecked. Makes no sense! Oddly an older version of Pimax had the same problem with SteamVR games. Sweviver noted that there was a workaround and ultimately it was a bug in the Pimax drivers (or dlls in particular) I feel like it's similar problem here. This close to better Elite Dangerous performance. Dang! I still can't measure it properly as far as resolutions, but the simple fact that the GPU is sitting on cycles doesn't make sense. Another tell is if I acheive 60fps without motion smoothing, the FPS will tank to 25 with it on - so it looks like a frame-timing issue. Literally the reason the GPU is underutilized may be because it is miscalculating what frame time it needs to beat. I've exhausted my attempts at the moment.

DJSlane commented 2 years ago

Actually your log looks good as well, but to no effect.