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

Support Wide Displays #6

Open
jbienz opened this issue Jan 31, 2022 · 2 comments
Open

Support Wide Displays #6

jbienz opened this issue Jan 31, 2022 · 2 comments

Comments

@jbienz
Copy link
Contributor

jbienz commented Jan 31, 2022

Is your feature request related to a problem? Please describe.
Currently Refract only works with Looking Glass Portrait and only displays the center 1/3 of the game.

Describe the solution you'd like
Support for wide screen LKG displays and full-frame games.

Describe alternatives you've considered
N/A

Additional context

I can think of 3 potential ways of doing this:

  1. Switch to rendering horizontal. The problem with this is that you have to get the game to render in half the vertical resolution but at the 2:1 compress ratio. This has to be done in Reglass (Reshade) before you can try to stretch it back out in Refrat to the full height and proper aspect ratio. You would need to add another shader pass in Reglass and expose an option for it in the shader settings. In Refract, you'd have to change the parameters on the UDD (desktop capture) object to capture the vertical half rather than the horizontal half. And you'd have to add an extra pass in the Refract displacement shader to stretch the result.

  2. Interlace. Rather than splitting the screen half and half, you would do every-other line. This might require less effort because you wouldn't have to squish. You'd only have to stretch. But the process would be similar to the above.

  3. The right way to do it would be to write a Reshade native plugin. These are new and are in Reshade 5. They're written in C++. The plugin would theoretically have access to the full color frame and the full depth buffer frame without screen splitting at all. The C++ plugin would then have to send this data to Refract over ICP (inter-process communication). Refract would need to be modified to receive frames over ICP rather than screen scraping. This is no small undertaking, but it's really the right way to do it if possible. It would get around the desktop duplication limitations some users are facing, and it would allow Refract to work on a much wider range of displays.

I haven't started this work because I don't have a wide screen display to test it on. If any users are thinking about implementing this, I highly recommend trying to implement it this way.

@kellyluck
Copy link

If you ever feel like tackling this, I have a wide display and would be happy to test for you.

@jbienz
Copy link
Contributor Author

jbienz commented Jun 26, 2024

I would potentially be up for tackling this, but I'd need a wide format display here myself to do it. This is because I would need to write a C++ plugin for Reshade and I would need to do a bunch of constant testing to get it right. If the folks at Looking Glass would like to donate a display for the purposes of supporting other orientations, I'd be happy to look into it. But it would probably be later this year before I could get to it due to other projects I'm working on right now. FYI, one benefit to this work would probably also be lower latency due to no longer needing to do screen scraping.

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

2 participants