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

XR_EXTX_Overlay support #101

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

ChristophHaag
Copy link
Collaborator

@ChristophHaag ChristophHaag commented Sep 30, 2021

SteamVR does not implement this extension, only tested on Monado.

Open questions:

  • public variables on the extension wrapper okay?
  • should main_session_visible be a NO_EDITOR property instead of calling get_main_session_visible every _process()?
  • env.background_color.a = 0.0 doesn't actually make the background transparent fixed: I forgot XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT

v2: Set XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT
Adds a WorldEnvironment to the Main node instead of relying on default_env.tres.
While a main session is not visible, env mode is sky.
If a main session is visible, env mode is a custom color with alpha = 0.

v2: Use set_transparent_background
@ChristophHaag
Copy link
Collaborator Author

New problem: A call to get_tree().get_root().set_transparent_background(true) or get_tree().get_root().set_transparent_background(false) breaks VR rendering, produces weird flickering of wrong/old textures.

@BastiaanOlij
Copy link
Member

New problem: A call to get_tree().get_root().set_transparent_background(true) or get_tree().get_root().set_transparent_background(false) breaks VR rendering, produces weird flickering of wrong/old textures.

The problem here is that this triggers resizing the viewport back to its original dimensions, for some reason this breaks when used in combination with render targets supplied by the VR plugin, I've got it on my list to look into but haven't gotten to it yet.

A viable workaround is to not use the main viewport but a separate viewport for VR rendering, only works for desktop VR though. You can have a look at the demo on the OpenVR plugin which uses this approach.

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.

2 participants