KhronosGroup / KhronosGroup/OpenXR-Docs

xrEnumerateViewConfigurationViews doesn't provide enough information

Open
#180 1 comment 0 reactions 0 assignees View on GitHub
synced to gitlab
Dominant language
Python
Stars
181
Forks
74
PR merge metrics
No merged PRs in 30d

Description

### The Problem

The function [xrEnumerateViewConfigurationViews](https://registry.khronos.org/OpenXR/specs/1.0/man/html/xrEnumerateViewConfigurationViews.html) returns the "recommended" and "max" image sizes for creating views in a [XrViewConfigurationView](https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrViewConfigurationView.html) struct, however this information is not sufficient in choosing a suitable view image size for the following reasons (suggestions for a fix below):

- _recommendedImageRectWidth/Height_ - This tends to return a size which renders much lower than the headset's physical resolution, making renderings noticeably low detail.
- _maxImageRectWidth/Height_ - This tends to return the maximum texture size the rendering hardware supports, which can be much higher than the headset's physical resolution, resulting in very poor performance.

Because the "recommended" size can be too low and "max" too high, these values are unsuitable for many apps and this leaves developers needing to _guess_ as to what image size to use. This often results in a "resolution multiplier" being used, which is often arbitrarily set around 1.4 or 1.7 times the recommended size, but obviously these are magic numbers geared towards a specific device and not universal across different devices. The purpose of OpenXR is to be cross-platform and take the guesswork out of VR/XR development, and for that end, improvement is needed in this particular case.

### Suggested Fix

Every app has different requirements: some have complex rendering which needs a lower resolution to maintain frame rate, others are simpler and can afford to render a sharper image. So what we need is a range of recommended values to cover all use cases, rather than just one.

My suggestion is to replace the "recommended" size values in [XrViewConfigurationView](https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrViewConfigurationView.html) with "recommended for performance" and "recommended for quality" sizes. Having this range allows developers to choose a value within that range which best suits their app without having to guess at the headset's actual resolution.

Currently the width values are:

typedef struct XrViewConfigurationView {
...
uint32_t recommendedImageRectWidth;
uint32_t maxImageRectWidth;
...
} XrViewConfigurationView;

The new structure would be:

typedef struct XrViewConfigurationView {
...
uint32_t recommendedPerformanceImageRectWidth;
uint32_t recommendedQualityImageRectWidth;
uint32_t maxImageRectWidth;
...
} XrViewConfigurationView;

Likewise for the height values.

The specification would inform the developers that any size within this range would be suitable for the view sizes, and not restricted to these specific values.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the linked xrEnumerateViewConfigurationViews and XrViewConfigurationView specification entries, then inspect the OpenXR-Docs repository structure to locate their source definitions. Determine whether the proposed performance and quality fields fit the specification and record the required wording and compatibility implications; done means an agreed specification change is fully documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.