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

Fix WebXR Layers example. #24691

Merged
merged 2 commits into from
Sep 27, 2022
Merged

Fix WebXR Layers example. #24691

merged 2 commits into from
Sep 27, 2022

Conversation

sigmaxipi
Copy link
Contributor

Invisible dummy meshes relied on old alphaWrite logic so they became
opaque after dfca2bd4748b00245225c9e4d8ba0ef7374c9b36 on Jan 27 and
obscured the quad layers. This switches to using colorWrite=false
logic to properly create holes in the 3D scene and let the dummy
meshes interect the controller ray without obscuring the quad
layers.

Tested:
  * https://raw.githack.com/sigmaxipi/three.js/webXrLayersFix/examples/index.html?q=webxr#webxr_vr_layers Properly shows the charts on the top two quads on a Quest 2 with chrome://flags/#webxr-layers enabled and ray intersection works properly with the quad layers and GUI.

Related issue: #XXXX

Description

A clear and concise description of what the problem was and how this pull request solves it.

This contribution is funded by Example

    Invisible dummy meshes relied on old alphaWrite logic so they became
    opaque after dfca2bd on Jan 27 and
    obscured the quad layers. This switches to using colorWrite=false
    logic to properly create holes in the 3D scene and let the dummy
    meshes interect the controller ray without obscuring the quad
    layers.

    Tested:
      * https://raw.githack.com/sigmaxipi/three.js/webXrLayersFix/examples/index.html?q=webxr#webxr_vr_layers
        Properly shows the charts on the top two quads on a Quest 2 with
        chrome://flags/#webxr-layers enabled and ray intersection works
        properly with the quad layers and GUI.
@Mugen87
Copy link
Collaborator

Mugen87 commented Sep 25, 2022

@Mugen87
Copy link
Collaborator

Mugen87 commented Sep 25, 2022

I've tested your PR with a Quest 2 but it seems the result is not as expected.

With the prod version, I see the two white rectangles over the snellen images but the rest of the scene is rendered correctly.

With your version, the lil-gui interface becomes black and the white rectangles become black, too, with white borders.

@Mugen87
Copy link
Collaborator

Mugen87 commented Sep 25, 2022

With your version, the lil-gui interface becomes black and the white rectangles become black, too, with white borders.

It seems an update of the quest browser solved the issue. The example looks good now.

@Mugen87 Mugen87 added this to the r145 milestone Sep 26, 2022
@mrdoob mrdoob merged commit 9926bd6 into mrdoob:dev Sep 27, 2022
@mrdoob
Copy link
Owner

mrdoob commented Sep 27, 2022

Thanks!

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.

3 participants