Erimelowo / OpenVR-Dynamic-Resolution

Lightweight OpenVR app to dynamically adjust your HMD's resolution depending on your GPU frametime, CPU frametime and VRAM.
https://store.steampowered.com/app/3243840/OVR_Dynamic_Resolution/
BSD 3-Clause "New" or "Revised" License
105 stars 7 forks source link

OpenVR Dynamic Resolution does not work with certain games #16

Open Crimson-foxGITHUB opened 1 year ago

Crimson-foxGITHUB commented 1 year ago

I decided to test Propagation VR with your application running, and it didn't change the resolution at all, even when increasing graphics settings to the maximum. UE4 handles resolution scaling stuffs a little differently, and I've noticed that not a single working title listed in WorkingGames.md as of typing this runs on Unreal Engine: every single game listed uses Unity in some form.

Erimelowo commented 1 year ago

Was https://github.com/Louka3000/OpenVR-Dynamic-Resolution/issues/15 solved?

Crimson-foxGITHUB commented 1 year ago

Was #15 solved?

maybe?

Erimelowo commented 1 year ago

Great, can you still confirm that no unreal engine games work now? I’ll add a note about it if yes.

Crimson-foxGITHUB commented 1 year ago

Tested both Propagation VR and Project Wingman with the upscaler. Both games use the deferred renderer with TAA as an anti-aliasing option, both games had "resolution scale" as options in their graphics menus, and both games would make OpenVR Dynamic Resolution change the global resolution, but absolutely nothing happened in-game.

Deferred rendering in VR is much more common with UE4 games, but Skyrim VR also uses it. Beat Saber in a recent update switched from regular Unity forward rendering to a new mode called Single-Pass Stereo. (a Unity 2021 feature, which might explain why both it and After the Fall don't work)

Worth noting however that whenever VRChat does update to Unity 2021, I doubt they are going to use Single-Pass Stereo because it completely changes the way shaders need to be written and would break legacy compatibility way, WAY more than the jump to Unity 2019 did.

Crimson-foxGITHUB commented 1 year ago

Tested out Bullet Train through Revive. TAA, the app gives resolution changes the game doesn't respond to, same story. Bullet Train doesn't even have a graphics menu, by the way.

I turn up the resolution: the framerate stays low I turn down the resolution: the app suggests 500% global res

Crimson-foxGITHUB commented 1 year ago

I tested out Google's WebXR sample using Google Chrome 114 and it was completely unresponsive to global resolution changes. Given that a couple of OpenXR-only titles are listed as "not working" this leads me to believe that any OpenXR-only game will not work with this application.

Erimelowo commented 1 year ago

I don’t believe OpenXR is a problem, as this can 100% work on post 2019 Unity games (e.g. games using 2021 Unity...)

Crimson-foxGITHUB commented 1 year ago

I don’t believe OpenXR is a problem, as this can 100% work on post 2019 Unity games (e.g. games using 2021 Unity...)

It's a question of which render mode they're using. Worth noting however that OpenVR FSR and VR Performance Toolkit do actually work with some UE4 games because they're using a different method to affect resolution.

Erimelowo commented 1 year ago

Yes, so it has nothing to do with OpenXR.

From what you're saying, it seems deferred rendering is the culprit, but that it doesn't apply to all games from any category, as it's the developer's choice, is that right?

Crimson-foxGITHUB commented 1 year ago

Yes, so it has nothing to do with OpenXR.

From what you're saying, it seems deferred rendering is the culprit, but that it doesn't apply to all games from any category, as it's the developer's choice, is that right?

Deferred rendering is developer-choice & engine-specific. Deferred rendering has a higher base cost than forward renderer, is much worse for transparency, & doesn't support MSAA, but doesn't need to calculate lighting for every pixel in the entire scene.

Worth noting that TWD:S&S does use forward rendering but isn't supported...

As for Single-Pass Stereo, I have no explanation as to why it'd cause Beat Saber to break, other than that the game already had a built-in resolution scaler:

which leaves me confused as to why BONEWORKS works correctly, but BONELAB doesn't.

Crimson-foxGITHUB commented 1 year ago

update: figured out that it's not DX11-only, Vulkan works just fine

Crimson-foxGITHUB commented 1 year ago

After testing Hellsplit Arena and seeing that it didn't work, I decided to look into how Unreal Engine handles screen resolutions. Turns out, the reason it works so well with Unity games is because Unity natively supports variable custom screen resolutions as an engine feature. Unreal Engine requires you to manually script resolution changes, and has a resolution scaler built-in.

I assume this is why Epic did not program Unreal Engine to support resolution changes via OpenVR calls in this manner, unlike Unity.

kruemmelbande commented 1 year ago

I tested population one, and it seemed to not really work, bui I'll do further testing tomorrow