KhronosGroup / KhronosGroup/OpenXR-Docs

Visibility mask API interacts poorly with multiview rendering

Open
#84 12 comments 1 reaction 0 assignees View on GitHub
synced to gitlab
Dominant language
Python
Stars
181
Forks
74
PR merge metrics
No merged PRs in 30d

Description

First, background: multiview rendering broadcasts a single stream of commands to two separate layers of an array image, with shader invocations distinguished on the GPU by an index that can be used to e.g. select the appropriate view-projection matrix. This is very convenient and may improve performance for stereo rendering, as is common with HMDs.

The visibility mask API provides a distinct set of vertices and indices for each view. This makes it painful to combine with multiview, because with multiview you must bind a *single* index buffer/vertex buffer set and render it to *both* views. OpenXR provides no guarantees whatsoever about the topology of the visibility mask, so portable code cannot assume that even the number of vertices matches, let alone their connectivity. Therefore, simply uploading the provided geometry to the GPU and drawing, even selecting between two vertex inputs based on view ID in the shader, is not portable.

I've worked around this problem in my application by flattening the indexed geometry of each view into a non-indexed triangle list, padding any mismatch in number of vertices using degenerate triangles, and finally selecting between two vertex inputs using the view index. This works okay in practice, but feels like a really horrible hack.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the visibility mask API and multiview rendering behavior described in the issue, including the constraints on per-view topology and shared buffers. Determine a portable API or specification change, then confirm that the proposed behavior supports both views without relying on matching geometry or application-specific padding.

Written by the indexing model from the issue text.

Assessment

Domain
api, computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.