Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenXR: Apply fix for reverse Z #90416

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

BastiaanOlij
Copy link
Contributor

@BastiaanOlij BastiaanOlij commented Apr 9, 2024

According to feedback we've received from the OpenXR group, this should be the right way to handle reverse-Z in OpenXR.

This only applies if the depth buffer is submitted to OpenXR, something that not all XR runtimes actually utilise (it's used for advanced reprojection if it is). This option is disabled by default and needs to be enabled if users want to try it out.

image

I tested this on:

  • SteamVR (Valve Index)
  • Oculus PCVR (Quest 3)
  • Oculus native (Quest 3)

Both with mobile and compatibility renderer. All seemed to work fine except SteamVR on compatibility giving a black screen. I've however verified that this is an existing problem unrelated to reverse-Z or this fix which should be investigated separately..

Copy link
Contributor

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I haven't tested, but this change looks good, and matches what the spec says about supporting reverse z:

Selection_139

@akien-mga akien-mga changed the title OpenXR: apply fix for reverse Z OpenXR: Apply fix for reverse Z Apr 9, 2024
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense!

@akien-mga
Copy link
Member

Needs rebase.

@akien-mga akien-mga merged commit 0d50f45 into godotengine:master Apr 10, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@BastiaanOlij BastiaanOlij deleted the openxr_fix_reverse_z branch May 2, 2024 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants