Problem about monitor resolution display in vive vr mode

As displayed below, everytime I pack up the project, it always display in a vertical scale (960 x 1080)in monitor(not hmd).

How can I set the display resolution to (1920 x 1080), like other unity vr games (as below) do?

Audoishield is a Unity game. Don’t know if it’s possible with UE.

It is definitely possible, though I don’t know how to do it. If you play Raw Data, that was just released on Steam, you can see that they made exactly that. I’d love to get a word from Epic or from the developers on how they did this.

Here’s how Raw Data did it:

https://www.reddit.com/r/Vive/comments/4svk6l/raw_data_no1_on_steam_top_sellers_list/d5coppy

In SteamVRRender.cpp look for the DrawRectangle calls and give it a wider crop. Under WindowMirrorMode == 1 you will see numbers like 0.1f, 0.2f, 0.3f, 0.6f. That’s basically UV coordinates for the crops. First Eye goes from 0 to 0.5, second from 0.5 to 1.0. Top to bottom of each eye is 0 to 1.0.

You basically want to just figure out the aspect ratio of your mirror window, and do an appropriate crop. You can experiment with it just by tweaking the numbers.

Hi Muchcharles, do you know if I have to recompile UE4 after making the crop change? I’m not getting any difference when changed.

I’m guessing recompile? If I rename the file altogether it still preview fine.

I thought it would pick up the change automatically the next time you clicked build; if not you can click ‘rebuild’ in visual studio, though that will take much longer.

I have to do some more testing but it does appear to need to be built each time.

I also haven’t grasped what UV coordinates I need to have it display in traditional widescreen. If anyone has working code that would be appreciated, otherwise I’ll slug through it and post later.

UPDATED:

Here’s what I used to get full 16x9 ratio in mirror screen

RendererModule->DrawRectangle(
RHICmdList,
0, 0,
ViewportWidth, ViewportHeight,
0.0f, 0.3f,
0.4f, 0.4f,
FIntPoint(ViewportWidth, ViewportHeight),
FIntPoint(1, 1),
*VertexShader,
EDRF_Default);

I’ve done this. Re-Built it. Then in UE4 also refreshed the visual studio project. When i build it in UE4 it still doesnt do 16:9

You updated updated under ‘WindowMirrorMode == 1’ correct?

Are you viewing the ‘VR preview’?

Maybe try the EXE final build?

I haven’t tried the VR preview. But I’ve packaged and built my game entirely and ran the exe.

Great,it’s very useful!Thanks a lot.

How does the scaling for this work? It’s outputting 16:9 yes but it’s only outputting 16% of the screen or so, so if you were to full screen it on a 1080 monitor wouldn’t it look super pixelated?

Tried doing this and wasn’t able to get it working at all. I really would like to adjust the black bars so I can record some nice footage of my game.