Igalia / wolvic

A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
https://wolvic.org
Mozilla Public License 2.0
829 stars 106 forks source link

Bad distortion in several projects #43

Closed Sgeo closed 2 years ago

Sgeo commented 2 years ago

Configuration

Wolvic version: 0.9.4 Wolvic build ID: 741e5072 (AC 63.0.0)

Hardware: Oculus Quest 2

Steps to Reproduce

  1. Visit and enter VR in any of the following sites:
  2. https://spiderman.webvr.link/
  3. https://aframe.io/examples/showcase/helloworld/
  4. https://mixedreality.mozilla.org/hello-webxr/

Current Behavior

There is a bad distortion, especially notable when rolling head left and right (instead of turning left/right or looking up/down)

Expected Behavior

There should be a comfortable VR experience

Possible Solution

I wonder if Wolvic is providing the proper projection matrices.

Or these projects could have a bug. Spiderman seems to be based on A-Frame, although Hello WebXR looks unrelated to A-Frame (I may be mistaken)

Context

Error Logs and Stack Traces

``` ```
msub2 commented 2 years ago

What is your IPD slider set to? For some reason only the middle setting seems to display WebXR experiences without distortion. I was also trying to figure this out in Firefox Reality but I can't seem to find any way of detecting where the slider is set to so I can compensate for it.

Sgeo commented 2 years ago

My IPD slider is set to the smallest setting, and yeah, middle setting seems fine.

That's a little bit confusing, shouldn't WebXR receive projection and view matrices? Trying to fix the problem by detecting IPD seems like a hack. Although if I wanted to know IPD I'd wonder if I could look at the two view/eye matrices, inverse one and multiply by the other, and examine that.

MortimerGoro commented 2 years ago

We made some changes recently in Gecko matrix multiplication, maybe this caused a regression, we'll check that.

Also related, I had a WIP patch to improve eye offset math in Gecko, as internally only used position based offset and it's better to include a transform, some devices might set additional values other than translation

RickAndTired commented 2 years ago

Wolvic version 0.9.5 f9678560 (AC 63.0.0) Oculus Quest 2 (tested on 4 different headsets)

I am also getting the same bug

This only happens on IPD setting 1 and 3 The bug is not present on IPD 2

This bug has also been present in Firefox Reality since Oct 2020

elima commented 2 years ago

This doesn't happen in Huawei VR, so looks like an issue in oculusvr backend.

svillar commented 2 years ago

This was fixed by @felipeerias in pull #134