servo: Hololens 2 rendering issues with Unity and WebXR - Regression?
In the current Firefox Reality in the Microsoft Hololens store, AR session works and rendered as intended. But the nightly build version ( 13/07 ServoApp_1.1.0.0_x64_arm64 ), has some rendering issues:
-
Rendering order.
-
Smearing on transparent background.
I took screenshots from the emulator, but as I understood from people with the device, it’s the same.
This is how it looks on the store version, you can see that the rendering order is right, and the transparent background is black (as the emulator doesn’t show scene mesh by default):

This is how the same AR session looks in the nightly build. You can see the smearing of the numbers and other objects. You can also see some errors in rendering order, the hand model should be near the user and not behind the floating table:

This is how it looks when I tried to use WebGLRenderingContext.clear (COLOR_BUFFER_BIT DEPTH_BUFFER_BIT and with and without STENCIL_BUFFER_BIT) at the frame start. There’s no smearing, but the hand is rendered behind the floating table:

As far as I know, on AR mode we shouldn’t use clear at the frame start, as in Handheld and Video see through devices, it has the camera image. If we use clear at the frame start, we won’t see the camera image.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 25 (18 by maintainers)
Commits related to this issue
- Auto merge of #27316 - asajeffrey:webxr-save-restore-gl-state, r=Manishearth Save / restore state when updating opaque framebuffer bindings <!-- Please describe your changes on the following line: -... — committed to servo/servo by bors-servo 6 years ago
- Auto merge of #27316 - asajeffrey:webxr-save-restore-gl-state, r=Manishearth Save / restore state when updating opaque framebuffer bindings <!-- Please describe your changes on the following line: -... — committed to servo/servo by bors-servo 6 years ago
- Auto merge of #27316 - asajeffrey:webxr-save-restore-gl-state, r=Manishearth Save / restore state when updating opaque framebuffer bindings <!-- Please describe your changes on the following line: -... — committed to servo/servo by bors-servo 6 years ago
- Auto merge of #27373 - asajeffrey:webxr-clear-every-frame, r=Manishearth Updated webxr <!-- Please describe your changes on the following line: --> Updates webxr to clear the render target every fr... — committed to servo/servo by bors-servo 6 years ago
- Auto merge of #27373 - asajeffrey:webxr-clear-every-frame, r=Manishearth Updated webxr <!-- Please describe your changes on the following line: --> Updates webxr to clear the render target every fr... — committed to servo/servo by bors-servo 6 years ago
It works! Thanks!
I just tested on the emulator
Can also confirm that it works on a device. Got a recording.
I even wrote a
TODOfor myself about this at https://github.com/servo/servo/blob/9cd22a01f78bf1b1e39609fb67ef7464a1ce3831/components/script/dom/xrwebgllayer.rs#L232I reproduced the issue on the HL2, let’s see if I can fix it.
The PR which hopefully fixes this has now landed, so the change should be in the next nightly build.
@De-Panther: let me know if it’s actually fixed this time!
@De-Panther this fix should be in the next nightly, let us know if this fixed things!
You people are AWESOME
OK, I think #27316 should fix this.
No, it’s a problem at our end:
GL commands are not meant to fail like this!
The demo can be found here: https://de-panther.github.io/unity-webxr-export/Build/ The clear flags test can be found here: https://de-panther.github.io/unity-webxr-export/Build/index_hololens_fbo.html