Forum Discussion
marksibly
11 years agoHonored Guest
direct mode window/buffer size...
Hi,
I'm a little confused about the direct mode window size. A note in oculusworldemo says:
// In Direct App-rendered mode, we can use smaller window size,
// as it can have its own contents and isn't tied to the buffer.
WindowSize = Sizei(1100, 618);//Sizei(960, 540); avoid rotated output bug.
However, if I reduce 'WindowSize' I get a crappier lower rez display on the oculus. Should WindowSize therefore be 1920,1080 for best results? Or perhaps this is a GL only issue?
Bye!
Mark
I'm a little confused about the direct mode window size. A note in oculusworldemo says:
// In Direct App-rendered mode, we can use smaller window size,
// as it can have its own contents and isn't tied to the buffer.
WindowSize = Sizei(1100, 618);//Sizei(960, 540); avoid rotated output bug.
However, if I reduce 'WindowSize' I get a crappier lower rez display on the oculus. Should WindowSize therefore be 1920,1080 for best results? Or perhaps this is a GL only issue?
Bye!
Mark
2 Replies
- I don't know about opengl, but in directx 11 there are four resolutions involved: the window resolution, the pre-distort render target resolution, the post-distort render target resolution and the oculus native resolution.
The pre-distort target is where we render the two eye images. This is typically around 1.5 times the oculus native res in order to have best image quality in the centre of vision.
The post-distort target is where the distorted result is rendered. It will typically be the same res as the rift.
The window on screen can be a smaller resolution, it down scales the post-distort target to whatever the window size is.
The post-distort target is also up or down scaled as needed to copy it to the oculus rift via Direct mode.
Normally when you make a window, the swap chain (the place it actually renders) is the same size. So a 1100x618 window means you are rendering at 1100x618. But they can be different, you can create the swap chain at a different resolution to the window, such as a 1100x618 window with 1920x1080 swap chain (swap chain down scales to the window). In the above case, the post-distort render target is the window's swap chain (the pre-distort target is just a render texture, it's never seen directly).
But as I said, no idea about opengl. - lamour42Expert ProtegeI allocate internal render target with a size proposed by the API. This was recommended in the dev guide:
Sizei recommenedTex0Size = ovrHmd_GetFovTextureSize(hmd, ovrEye_Left, hmd->DefaultEyeFov[0], 1.0f);
Sizei recommenedTex1Size = ovrHmd_GetFovTextureSize(hmd, ovrEye_Right, hmd->DefaultEyeFov[1], 1.0f);
ovrRenderTargetSize.w = recommenedTex0Size.w + recommenedTex1Size.w;
ovrRenderTargetSize.h = max(recommenedTex0Size.h, recommenedTex1Size.h);
This example is for a combined big render target that will hold images for both eyes. The output window on the desktop (or a fullscreen) is completely independent from this and can have any size. In direct mode the same internal render target is used for display on the oculus. That's why it makes no difference how big the desktop window is for the image quality you experience when using the oculus.
I disagree with kojack on the size of the render target for distortion: As the distortion effectively reduces resolution it is very important to use the recommended higher render target size for the distorted image! We don't really know what happens in SDK render mode, because we don't have details on what happens during the distortion. But for client rendering (which I use) the distortion shader code runs last in the rendering pipeline and will leave the big render target with a distorted image in higher resolution than the oculus hardware offers. This hi-res image will then be downsized when displayed on the oculus.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 9 months ago
- 7 months ago
- 7 months ago