immersive-web / webxr-samples

Samples to demonstrate use of the WebXR Device API
https://immersive-web.github.io/webxr-samples/
MIT License
1k stars 483 forks source link

Inverted stereo in `360-photos.html´ (device dependent?) #132

Open Mikael-Lovqvist opened 2 years ago

Mikael-Lovqvist commented 2 years ago

When media/textures/chess-pano-4k.png is loaded it is using mode stereoTopBottom but it seems it should use stereoBottomTop. I tested this by adding this to skybox.js https://github.com/Mikael-Lovqvist/webxr-samples/commit/b4e88cbc2362b821833fd35a08b4395a52e2688b and then testing it like so https://github.com/Mikael-Lovqvist/webxr-samples/commit/99e2bbe0260d39bd26aca9970f0438cd3f9b230f

This was tested on an Oculus Quest 2, I saw there were earlier mentions of inversion and the jpeg was replaced with a corrected png, could this be device dependent?

alfski commented 2 years ago

The chess-pano-4k.png (Right on top, Left on bottom) is stereo inverted on a Quest 1 as well. The older chess-pano-4k.jpg (Left on top, Right on bottom) displays correctly.

The normal convention is "stereoTopBottom" (Left on top, Right on bottom). I'd just go back to the older reference mage? (additionally the original jpeg is only 2.5Mb vs 20Mb for the swapped .png!)

Mikael-Lovqvist commented 2 years ago

I think there is a certain completeness if the API used in the sample supports all four ways (top/bottom, bottom/top, left/right and right/left) but ultimately someone from this project will have to make a decision. To just fix it by changing the image feels slightly wrong to me in case you for whatever reason want to break "normal convention" (if there even is such a thing). Just my two cents!

mrxz commented 1 week ago

I noticed the same issue while trying to use stereo-top-bottom with an Equirect layer. With the Meta Quest Browser on the Quest 3 the top-half gets shown in the right eye and the bottom-half in the left eye.

The chess-pano-4k.png file seems to have right on top and left on the bottom as well. It is used in two examples: 360 Photos and Equirect Layer, but it only renders correctly in the latter. With a Pico Neo3 Link both examples show inverted stereo.

So it seems that the Meta Quest browser renders stereo-top-bottom inverse and the chess-pano-4k image got incorrectly inverted in this commit: https://github.com/immersive-web/webxr-samples/commit/071895b73a36be3f0c89ad8b1099d039e6a45f37