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

Rendering stops after entering WebXR with Godot 4.2-beta4 #84255

Closed
dsnopek opened this issue Oct 31, 2023 · 4 comments · Fixed by #84267
Closed

Rendering stops after entering WebXR with Godot 4.2-beta4 #84255

dsnopek opened this issue Oct 31, 2023 · 4 comments · Fixed by #84267

Comments

@dsnopek
Copy link
Contributor

dsnopek commented Oct 31, 2023

Godot version

v4.2.beta4.official [93cdacb]

System information

Chromium-based browsers (Brave with the WebXR emulator addon)

Issue description

When exporting the Godot XR Tools demo for web using Godot 4.2-beta3, everything works fine!

However, when exporting with Godot 4.2-beta4, the demo appears to stop rendering (completely black screen) after clicking the "Enter VR" button. There are no errors or messages in the console providing any hints.

I haven't had a chance yet to bisect and find which change is causing this regression.

UPDATE: Git bisect points to PR #83649 as the cause of the regression

Steps to reproduce

  1. Download the Godot XR Tools demo
  2. Open with Godot 4.2-beta4
  3. Export for web
  4. Open in your browser and click the "Enter VR" button

Minimal reproduction project

Use the Godot XR Tools demo

@dsnopek
Copy link
Contributor Author

dsnopek commented Oct 31, 2023

Git bisect points to PR #83649 as the cause of the regression

@dsnopek
Copy link
Contributor Author

dsnopek commented Oct 31, 2023

I've narrowed it down to this line in renderer_viewport.cpp:

bool can_draw_2d = !p_viewport->disable_2d && p_viewport->view_count == 1; // Stereo rendering does not support 2D, no depth data

If I change that to this:

bool can_draw_2d = !p_viewport->disable_2d;

... then WebXR rendering works again.

I'm not sure why WebXR depends on 2D rendering happening? I'll try to dig into it when I get a chance.

/cc @BastiaanOlij

@dsnopek
Copy link
Contributor Author

dsnopek commented Oct 31, 2023

Ah, a new piece of information: this appears to only break running WebXR in a desktop browser. Everything appears to work fine when using the Oculus Browser running standalone on the Meta Quest 2.

@dsnopek
Copy link
Contributor Author

dsnopek commented Oct 31, 2023

I just posted PR #84267 which seems to fix it in my testing, despite not really seeming like it should fix anything :-)

@github-project-automation github-project-automation bot moved this from Pending Decision to Done in 4.x Release Blockers Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants