Skip to content

fix: black bars display issue on quest3 - #27

Merged
emawind84 merged 1 commit into
questzdoom-r15-maintfrom
questzdoom-r15-q3-fix-blackbars
Jul 27, 2026
Merged

fix: black bars display issue on quest3#27
emawind84 merged 1 commit into
questzdoom-r15-maintfrom
questzdoom-r15-q3-fix-blackbars

Conversation

@emawind84

@emawind84 emawind84 commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Fixes #20

@emawind84

Copy link
Copy Markdown
Owner Author

This PR fixes issue #20

@emawind84

Copy link
Copy Markdown
Owner Author

Root cause, found by static tracing (no device log needed here — it's a math bug, not a driver quirk):

The bug: two places compute a single "averaged" symmetric FOV from both eyes' actual per-eye FOVs, then apply that same averaged FOV to both eyes:

VR_GetVRProjection() in QzDoom_OpenXR.cpp (the "meta" branch) — used to build the render projection matrix.
TBXR_submitFrame() in TBXR_Common.cpp — used to set projection_layer_elements[eye].fov, i.e. what's declared to the OpenXR compositor as each eye's actual FOV.

The averaging does angleLeft = (eye0.angleLeft + eye1.angleLeft) / 2, etc. But angleLeft/angleRight are per-eye-local — eye 0's angleLeft is that eye's outward (temporal) side, while eye 1's angleLeft is that eye's inward (nasal) side. These aren't the same physical direction, so averaging them mixes outward and inward angles together. This only produces a harmless no-op if a headset's per-eye FOV is already close to left/right-symmetric — apparently true enough on Quest 2 to hide the bug. Quest 3's pancake-lens optics report more asymmetric per-eye FOV, so the average visibly shrinks the usable FOV on both outer edges — exactly the "black bars on both sides, most noticeable looking straight ahead, horizontal only" symptom, and consistent with the menu (which doesn't go through this path) being unaffected.

The fix: use each eye's own actual, unaveraged FOV in both places — matching what the "pico" branch already did correctly, and making sure the compositor is told the true FOV of what was actually rendered into each eye's swapchain.

…positor/projection (Quest 3 black bars)

VR_GetVRProjection() and TBXR_submitFrame() averaged both eyes' angleLeft/angleRight
into one shared symmetric FOV and applied it to both eyes, mixing each eye's outward
(temporal) angle with the other eye's inward (nasal) angle. This was a no-op on
headsets with near-symmetric per-eye FOV (Quest 2), but on Quest 3's more asymmetric
pancake-lens FOV it shrank the usable FOV on both outer edges, causing visible black
bars (#20). Fixed by using each eye's own actual FOV (gAppState.Projections[eye].fov)
for both the render projection matrix and the FOV declared to the compositor,
matching the existing pico code path.
@emawind84

Copy link
Copy Markdown
Owner Author

@DrBeef this fix could be of help for other ports

@emawind84
emawind84 force-pushed the questzdoom-r15-q3-fix-blackbars branch from c8ec6d0 to 050e8d4 Compare July 27, 2026 07:03
@emawind84
emawind84 merged commit 050e8d4 into questzdoom-r15-maint Jul 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant