VR only: The rendering order on alpha meshes seems to be altered by something other than camera distance

Here is a playground where the issue repros, only on VR. The text block is displayed correctly when looking at one half of the dome, while it renders incorrectly when looking at the other half of the dome.

  • Bug repro on: https://www.babylonjs-playground.com/#M0EBV0#2

  • Expected result:
    On VR, the message ‘Can you read me now?’ should be displayed properly for every camera degree

  • Current result:
    This is VR on a camera angle where it doesn’t show:
    can you see me video_Moment2

We starting seeing this issue when we updated from 4.2.0-alpha.2 to 4.2.0-alpha.20.

On the playground example, the distance for the box and 2 planes from the camera is very clear and the order is correct at every moment. However the rendering doesn’t seem to be working as expected. On half of the dome, the menu renders correctly and on the other half, it doesn’t.

1 Like

Following the conversation from the bug on github: VR only: Acrylic texture not showing contrast for certain camera angles · Issue #8424 · BabylonJS/Babylon.js · GitHub

Yup it sounds real strange and looks like a regression. @RaananW will investigate it in the morning to understand what changed. Thanks a lot for the report.

Hi,

Sorry, couldn’t find the time today. I’ll make sure to inspect that later today or tomorrow.

As I wrote on github, I believe it’s because the mesh is flipped due to the last lookAt call. Still need to figure out what changed

2 Likes

Sorry, i take it back - something is off:

Seems like the two eyes invert the render order. Still no solution, but working on it.

1 Like

Great let me reopen the issue during this time then as it is a confirmed bug. Thanks again @RaananW

LOL you beat me on the reopen button :slight_smile:

1 Like

This PR fixed the issue (and also explains what happened) - [XR] View Matrix calculations by RaananW · Pull Request #8445 · BabylonJS/Babylon.js · GitHub So I hope alpha 21 will bring everything back to normal :slight_smile:

3 Likes