Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes with new Reshade 5.0 #36

Open
vrnord opened this issue Feb 2, 2022 · 22 comments
Open

Crashes with new Reshade 5.0 #36

vrnord opened this issue Feb 2, 2022 · 22 comments

Comments

@vrnord
Copy link

vrnord commented Feb 2, 2022

Excited to try out the new Reshade 5.0 with supposed performance improvements and built-in SteamVR support, but SkyrimVR crashes every time (and froze the entire computer one time) when Vrperfkit is also enabled. This is whether Reshade 5.0's dll is renamed as d3d11 or dinput8: the normal load screen appears that says Reshade 5.0 is loading, then the game crashes. Switching back to your version of Reshade's dll renamed d3d11 works normally.

The logs are interesting - Reshade 5.0 (dinput8) says it is terminating due to DXGI, and the Vrperfkit log appears to be endlessly setting texture sizes.

Thanks!

DINPUT8.log
vrperfkit.log

@drowhunter
Copy link

Doesn't Reshade and VRPerfkit both inject using dxgi.dll ?

I would think this would make them totally incompatible.

@vrnord
Copy link
Author

vrnord commented Feb 2, 2022

No you can rename the 4.x Reshade dll to d3d11.dll and then both function, that is well known.

However 5.0 seems to be incompatible.

@speed-of-heat
Copy link

works OK for me but i rename the vrperfkit dll to d3d11.dll rather than the reshade dll.

@vrnord
Copy link
Author

vrnord commented Feb 2, 2022

OK I tried that and it didn't crash this time, however now there are several errors in the Vrperfkit log like this: "(!) ERROR: Failed to install hook for CreateDXGIFactory" so not sure if it is working properly when renamed?

Vrperfkit log when renamed to d3d11.dll:
vrperfkit.log

@DJSlane
Copy link

DJSlane commented Feb 3, 2022

Glad to see @speed-of-heat to be interested in this. I think you've had some good tips in other forums! Did you see the DCS mod for FFR in the fork: https://github.com/cedriclmenard/vrperfkit This now appears to be ~8%FPS boost on my Pimax.

@speed-of-heat
Copy link

speed-of-heat commented Feb 3, 2022

yes, i did and was "testing" it with just the frame rate counter last night before i went to bed, and I saw a "good" improvement, so thanks for that @DJSlane any chance that this will get pulled into the core build by @fholger ? or are the changes DCS specific only?

@DJSlane
Copy link

DJSlane commented Feb 3, 2022

It should! It should! I can't believe it works not only for DCS but FFR even works for Elite Dangerous (it probably did before the fork). I've simply never seen better performance. This is a real game-changer. Regrettably I've noted that the focal centers don't line up with Pimax canted displays - not a big deal as with a setting of 0.9 radius - you still save about 5-10% frame time. Only a small portion is even within the frustrum anyway. I simply suspect that if we could in any way adjust the focal point left or right on each eye I feel it would enable even more performance. Currently at 0.9 radius I can start to see the resolution decrease in the inner portion of my FOV - that is: toward the nose. Sadly I then realized that the outer portion is almost entirely covered by the full rendering resolution. So in effect, I could probably double the performance boost or more by having the ability to change the location of the Fovea in each eye either manually or by some setting made for Pimax etc. Since when I'm using the Pimax, the first 100 degrees of FOV are core, the rest is merely for immersion. All I know is I hope @fholger and @cedriclmenard and others continue to develop this mod even further to include more games, headsets and settings. And that they know that what they are doing is nothing short of advancing VR at least by a year or two in terms of what VR games can do.

@fholger
Copy link
Owner

fholger commented Feb 3, 2022

The mod does calculate the proper focal point for Pimax. The issue, however, is that in some games it is impossible to know when the game is rendering which eye. This is why in such instances I do not apply any foveation at all. Cedric's version in these instances instead applies foveation with a focal point in the center of the image, which is obviously not correct, but works without knowing which eye is rendered. So in short, there is no simple way to make this work properly in all games. It does work correctly in most Unity and Unreal games, but custom engines are a different matter.

@DJSlane
Copy link

DJSlane commented Feb 3, 2022

Incredibly interesting. So for the upscaler radius we can assign which eye it's rendering, but not for the FFR? FFR must be at a different process in the pipeline.
That is to say: FFR is at the pre-render level, CAS and sharpening is in post? Have I got that right?

@fholger
Copy link
Owner

fholger commented Feb 3, 2022

Yes, that's correct.

@drowhunter
Copy link

So the chances of this getting pulled in is slim in its current state.

However since it can work I wonder if it would be possible to allow FFR in these scenarios via an option? (Just include a comment saying Use at your own risk , and your Milage may Vary"

Knowing that it can work but wont be perfect can be better than not having it at all. Even better as was mentioned above can we have an option to tweak it manually?

@drowhunter
Copy link

Oh and 1 more thing @fholger ,

now that reshade 5 is out and has VR support would it be possible since they both seem to hook the same way.

For you to develop your perfkit as an official reshade plugin, with all options tweakabke within its UI?

That would be so much cooler than having to use the Ctrl-F Keys?

@cedriclmenard
Copy link

IMO I don’t think it should be part of @fholger excellent tool kit. It is a hacky workaround.

And at the end of the day, this kit still requires per-game installation.

I’ll keep my fork updated with this repo’s master for as long as I can.

@drowhunter
Copy link

Well if it was a hidden option it might be cool, because we need to install it per game anyway. 😉

@DJSlane
Copy link

DJSlane commented Feb 3, 2022

Too humble perhaps! The problem also comes from the lack of support for non-parallel projection in many games. For example DCS does have the correct Foveated center on each eye. So the problem isn't necessarily @cedriclmenard's implementation. Rather, the games have to allow for non-parallel projection. After using the mod for a while I think it should be merged because it seems to work as a fall-back method. So although you meant for this to work only for DCS. I've successfully used it now in Elite Dangerous and Subnautica SubZero. -- In each case providing 5-10% benefit without being at all noticeable. Before, they didn't work at all as I recall.

In short, I think a fall-back method of using the center of the frame (regardless of eye) is an excellent addition to the mod.

@fholger
Copy link
Owner

fholger commented Feb 3, 2022

Oh and 1 more thing @fholger ,

now that reshade 5 is out and has VR support would it be possible since they both seem to hook the same way.

For you to develop your perfkit as an official reshade plugin, with all options tweakabke within its UI?

That would be so much cooler than having to use the Ctrl-F Keys?

The fixed foveation could absolutely work as a Reshade plugin, and I'm seriously considering it as it would be much easier to make it work with APIs other than D3D11. The upscaling part, however, is trickier, because Reshade currently has absolutely no concepts to enable that and would require some ground work to be done in Reshade, first.

@drowhunter
Copy link

drowhunter commented Feb 3, 2022

The fixed foveation could absolutely work as a Reshade plugin, and I'm seriously considering it as it would be much easier to make it work with APIs other than D3D11. The upscaling part, however, is trickier, because Reshade currently has absolutely no concepts to enable that and would require some ground work to be done in Reshade, first

I just imagined adjusting the fov radius and sharpening strength via reshade sliders and it made me giddy. 😁

As for the ground work in reshade, it's a good thing they accept PR's 😉

@fholger
Copy link
Owner

fholger commented Feb 3, 2022

Yeah, but this wouldn't be just an afternoon's amount of work, and I am rather busy with other projects ;)

@speed-of-heat
Copy link

Okay it sounds like that's a committed plan ;)

@drowhunter
Copy link

No doubt, take your time.

There already is an AMD CAS plugin in reshade 5 right now. So I see no reason why FFR couldn't be there as well.

@r4Th-dev
Copy link

r4Th-dev commented Feb 4, 2022

@cedriclmenard
I tried the FFR with DCS with an Oculus Quest 2 and it worked BUT only when I don't modify the "FOV-Tangent Multiplier".
I usually set it to 0.8;0.8 and with this DCS will crash once you enter a Map (Main Menu works perfectly)

@drowhunter
Copy link

drowhunter commented Feb 24, 2022

I just noticed over on the OpenXR Toolkit, they have implemented what we want. Its also kind of cool they have an overlay.
Apparently they are using the same code as this project, I wonder if that overlay they are using could make it's way over here?

https://github.com/mbucchia/OpenXR-Toolkit/issues/115#issuecomment-1047371481

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants