amwatson / CitraVR

Port of the leading 3DS emulator, Citra — designed for playing 3DS homebrew and personal game backups in 3D on the go with your Quest.
GNU General Public License v3.0
741 stars 61 forks source link

Multiview #6

Closed lvonasek closed 9 months ago

lvonasek commented 9 months ago

Is there an existing issue for this?

What feature are you suggesting?

Why would this feature be useful?

Hi Amanda, congratulations on the release of CitraVR. It's great fun to play some of the 3DS games on the big VR screen.

Are you considering integrating the Multiview extension? I use it in several VR projects and it sometimes doubles the FPS. It might be difficult in the emulator itself, I never managed to implement it in my PPSSPP VR OpenXR integration (because of the complexity of the framebuffer, but that might be easier in Citra).

If you have a lot to do, let me know and I might take some time to check it out.

amwatson commented 9 months ago

Thanks so much for the suggestion! It's an honor!

I was wondering that as well, actually. Using multi view could significantly reduce rendering costs. I've never used multi view myself (plus the openxr one is different from vrapi), but I think if you've got a shader that takes in an eye projection for stereo, it should work.

I'll take a look at the Citra renderer, and you should as well!

It'd definitely require a tighter coupling between the core Citra and openxr rendering code, which I'm willing to do after I pull in the new version of Citra from mainline.

lvonasek commented 9 months ago

I don't know when I'll have enough time for it. The source code of Citra is still an unknown place for me.

Although I played with it a bit today and managed VR180 rendering (don't get too excited it is just a dirty hack, nothing ready to be merged): https://www.youtube.com/watch?v=xrKHLtq2hqY

In the headset it is very pixelated and there is not enough power to increase the resolution. Would it be possible to decouple the resolution for the lower screen? If I upscale the main screen for VR, I don't want the high resolution to be applied to the small touchscreen as well.

amwatson commented 9 months ago

@lvonasek I added a pull request for your 180 degree mode to pull into the main project -- looking for your signoff, and if you'd like to initiate the pull request yourself from your own branch so you are credited as the author. I placed the feature behind an "Experimental" setting users can toggle.

I'm aware of the limitations regarding perf + resolution (note: I didn't update the constants, I've just hard-coded the resolution along that path to be 5x). My reasons for wanting to accept the feature are: a) It seems to provide value to users b) Some community members did some ad-hoc compat testing c) Upcoming changes are going to make your changeset harder to merge and may require you to update it.

Also, check that I'm explaining it correctly

lvonasek commented 9 months ago

Note that multiview is a different feature request than immersive mode.