HMD Eyebuffer resolution is tied to mirror window resolution in error prone way in SteamVr integration

Hi, I’ve looked into it more. It is still wrong: while GetRecommendedRenderTargetSize is called with hardcoded values for the vive screen, the actual buffer is allocated as a multiple of the mirror.

So by default with the 720p mirror window you get a multiplier intended for 1200p, but applied to 720p. Ends up very blurry.

And if you change the mirror reolution, the eye buffer resolution changes too, which it shouldn’t.

Also, the WindowMirrorBoundsWidth and height variables are settable by ini file, so you could in theory set them to 1280x720 and get the right multiplier, but GetRecommendedRenderTargetSize is getting called with them a few lines before the ini is loaded and the values are read.

Here’s steps to reproduce:

Launch a default project in VR. Query r.ScreenPercentage-- it will be 140 by default, which is the correct multiplier for the vive screen if baseline off of the vive screen resolution. Instead things are baseline off of the 720p mirror window and it will be blurry.

If you now run ‘r.SetRes 2160x1200’ on the console, things will be much clearer: that’s the Vive’s screen resolution, and combined with the 140 ScreenPercentage it gives the correct eyebuffer size.

There is no way for devs to know to do this without reading a lot of code, and if one of their users is on a 1080p or 720p monitor the Smirror window will be limited and it will end up affecting the HMD res (I just tested this as well, set desktop res to 720, launch game, run ‘r.SetRes 2160x1200’, and your window is limited to 720p and the HMD view, based on that window size, is blurry; run with a 1440p desktop, the mirror fits, and the HMD view is clear).