Debugging for Virtual reality

  • eduwushu
  • Topic Author
More
2 years 6 months ago #1 by eduwushu Debugging for Virtual reality was created by eduwushu
I was trying to play around with Reshade for VR, using the latest version of source in Git.
I found out it works but there are still some issues. In my particular case what happens is that the VR goggles get the effects always active. The toggle effect shortcut just enables/disables it on the desktop screen. Also if I change the profile only the game desktop window switches to the new effects, the VR stays with the previous effects enabled. So its as if whatever I do in the gui overlay, it only affects the normal window and not the VR output.

I wanted to try and debug this to see if I could fix it myself, but I haven't found an effective way tod o so. I just wanted to ask the dev which is his preferred way. The debug app configuration in VS is not prepared to run with OpenVR.

Thanks!

Please Log in or Create an account to join the conversation.

  • crosire
More
2 years 6 months ago - 2 years 6 months ago #2 by crosire Replied by crosire on topic Debugging for Virtual reality
This is actually intentional behavior: Desktop window and VR have two separate instances of the ReShade runtime, so that you can use different effects in each (though they currently share a config file, so in reality it's not particularly usefull, this needs to be changed still).
You can configure the VR instance of ReShade directly inside VR (a new ReShade icon is added to the SteamVR dashboard, select that and you'll be presented the usual user interface, but controllable with your VR controllers).

Debugging usually involves building the "Debug" config, loading that into a game and then attaching a debugger to the game to see what's happening.
Last edit: 2 years 6 months ago by crosire.

Please Log in or Create an account to join the conversation.

  • eduwushu
  • Topic Author
More
2 years 6 months ago #3 by eduwushu Replied by eduwushu on topic Debugging for Virtual reality
Thanks crosire for the reply!

Yesterday evening I did manage to attach the debugger to an app and figured out the double runtime situation that you mention.

Funnily enough I bought the HP Reverg G2 but without controllers, as I dont play VR with them. This means apparently that opening the openvr dashboard turns into an impossible task (please let me know if you know of a way).
So now what I was trying to figure out is if I can make it in the code to sync the show_overlay state of the non vr runtime with the vr runtime as a workaround, but for that I dont know if runtimes have a way of knowing about each other. I'll continue today on this.

Please Log in or Create an account to join the conversation.

  • crosire
More
2 years 5 months ago #4 by crosire Replied by crosire on topic Debugging for Virtual reality
You can actually still control the dashboard overlay using a developer feature in SteamVR:
While the game is running, open the SteamVR context menu and go to Developer > Overlay Viewer. In the new window click on the "reshade" entry in the list and you'll see the overlay show up to the right. Now check on "Mouse Capture" in the bottom right and you'll be able to control the overlay with your mouse as usual.

Please Log in or Create an account to join the conversation.

  • eduwushu
  • Topic Author
More
2 years 5 months ago #5 by eduwushu Replied by eduwushu on topic Debugging for Virtual reality
Ok thanks a lot! That's very useful!

Please Log in or Create an account to join the conversation.

  • eduwushu
  • Topic Author
More
2 years 5 months ago #6 by eduwushu Replied by eduwushu on topic Debugging for Virtual reality
Hi crosire!
I've been giving it a go to what you said, also in the newly released 5.0.2 version.
I can, as you mentioned, spawn up the overlay using the developer > OverlayViewer, and click in the settings tab. But it seems I'm not able to assign any key to the Effect Toggle functionality. Even if I edit the .ini file to make the assignment by hand and I put a keyboard key it won't work the key assigned for the VR to toggle on/off the effect.

I wonder if keyboard assignments work for the steamVR side. I also borrowed a couple of controllers and tried to assign instead one of the controller buttons but with no success.

Any ideas?

Thanks!

Please Log in or Create an account to join the conversation.

  • eduwushu
  • Topic Author
More
2 years 5 months ago #7 by eduwushu Replied by eduwushu on topic Debugging for Virtual reality
Ok I think I figured out what´s going on. When the VR runtime is created it creates an input class to which a nullptr Window handle is passed. This means the input cannot register to the window message queue processing so it can never detect keyboard presses, therefore the effect toggle key would never be detected.
Any runtime uses always the same hardcoded Reshade.ini file, which means the input assignment will always be the same in both VR and non VR runtime, but it will only work in the pc.
You know if its feasible passing the non VR runtime window handle to the input class of the VR runtime so at least we can use the input from the main window?

Please Log in or Create an account to join the conversation.

  • crosire
More
2 years 5 months ago - 2 years 5 months ago #8 by crosire Replied by crosire on topic Debugging for Virtual reality
It's not feasible for official ReShade, since you generally don't want your interaction on the main window doing funky stuff in the overlay that is visible in the VR headset. It's just very much designed for interaction with VR controllers in mind.
But it sounds like a reasonable workaround for your usecase, so nothing stopping you from implementing it and building ReShade for yourself.

Also note that the code is technically already set up to have different config files per runtime, it's just they all default to the same file name right now.
Last edit: 2 years 5 months ago by crosire.

Please Log in or Create an account to join the conversation.

  • derDan
More
2 years 2 months ago - 2 years 2 months ago #9 by derDan Replied by derDan on topic Debugging for Virtual reality
Hi,

I have the same problem as eduwushu. I wanted to use Reshade in VR without controllers (as most of the SimRacing and FlightSim community playing in VR, I guess).

I tried the solution mentioned above. Unfortunately, as the game was running (in the menu screen as well as in a race), i couldn't see the "reshade" entry in the Overlay Viewer list in SteamVR.

If I could provide more details that may help solving this problem, I would be happy to do that. Since I haven't played any game without Reshade for years, I would be very thankfull for some help to use Reshade also in VR.

ps - the game I am referring to is Automobilista 2. When I start it in Normal (non-VR) Mode, Reshade is working as usual.

Thanks :)

 
Last edit: 2 years 2 months ago by derDan.

Please Log in or Create an account to join the conversation.

  • Gandalf
More
1 year 8 months ago - 1 year 8 months ago #10 by Gandalf Replied by Gandalf on topic Debugging for Virtual reality
Currently trying to sort this out for my vr however i do not have the option in steam vr overlay viewer to select reshade. I also cannot access vrtoolkit via reshade in the base menu. Is there any fix to this?

edit: Got it to work. However, I cannot access the steam vr reshade options without it crashing my game 100% of the time.
Last edit: 1 year 8 months ago by Gandalf.

Please Log in or Create an account to join the conversation.

  • iNicYT
More
8 months 4 weeks ago #11 by iNicYT Replied by iNicYT on topic Debugging for Virtual reality
how did you get it to work without the menu because mine wont show reshade either

Please Log in or Create an account to join the conversation.

  • whatever
More
1 month 3 weeks ago #12 by whatever Replied by whatever on topic Debugging for Virtual reality
what is the application do you use ?

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.