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 an...
lamour42
11 years agoExpert Protege
I 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.
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
- 10 months ago
- 8 months ago
- 8 months ago