immersive-web / webvr-polyfill

Use WebVR today, without requiring a special browser build.
http://immersive-web.github.io/webvr-polyfill/examples/
Apache License 2.0
1.4k stars 325 forks source link

Incorrect device parameters on SM-G930F #273

Closed neeh closed 6 years ago

neeh commented 7 years ago

We're having troubles with Samsung Galaxy S7 when using the polyfill.

As you can see on the following picture, the distortion is incorrect on this device :

webvr-polyfill-dbdp-smg930f


The device parameters reported by the DPDB, (be it local or remote) are :

{
    "type": "android",
    "rules": [
        {
            "mdmh": "samsung/*/SM-G930F/*"
        },
        {
            "ua": "SM-G930F"
        }
    ],
    "dpi": 576.6,
    "bw": 3,
    "ac": 1000
}

Which gives :

{
    width: 1920,
    height: 1080,
    widthMeters: 0.08457856399583766,
    heightMeters: 0.04757544224765869,
    bevelMeters: 0.003
}

Strangely, it works well when using default Android parameters :

webvr-polyfill-dpdb-default

{
    widthMeters: 0.110,
    heightMeters: 0.062,
    bevelMeters: 0.004
}

Is the DPDB entry for this device incorrect?

jsantell commented 7 years ago

Thanks for reporting!

Added in #164 via @PixelPartner; ping @AdaRoseEdwards, have you seen similar on Samsung Galaxy S7? Any ideas?

neeh commented 7 years ago

Thanks for the link @jsantell

I followed the instructions. From the Device Info app I have :

diagonal: 5.09 inches
width: 2.48 inches
height: 4.45 inches
DPI: 480
Actual DPI X: 435.42825
Actual DPI Y: 431.57477
(computed bevel: 0.0272)

My user agent is : Mozilla/5.0 (Linux; Android 7.0; SM-G930F Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.125 Mobile Safari/537.36

I checked width and height with a ruler infos are correct.

Seems like the DPI is wrong in the DPDB?

jbreckmckye commented 7 years ago

You should raise an issue here - https://github.com/WebVRRocks/webvr-polyfill-dpdb

AdaRoseCannon commented 7 years ago

I had not seen this precise issue unfortunately my S7 died last week.

The only issue I had seen is when power saving mode is on and the resolution is reduced. If the resolution is less than maximum it will get an incorrect crop.

fredsa commented 7 years ago

Likely same issues as described in https://github.com/googlevr/gvr-unity-sdk/issues/421

ancientc commented 7 years ago

The issue is still there with the newest update too on Samsung S7. How shall I fix this?

AlexanderStohr commented 7 years ago

seeing a note on Google VR Settings all possibly beeing updated at end of month.

SM-G930F seems to be a problem for at least Andorid 7.0 update and maybe starting in at least April 2017. (there the user could select the offscreen resolution in three steps and this buffer was zoomed/interpolated to the screen. the default setting is the middle option (FullHD). maybe it was set this way for power saving reasons. maybe the prior setting was the somewhat higher native resolution o the display. dpi values for the frame buffer resolution will thus change - for whatever reason that will make VR applications sort of fail.) But some reports on this happening even with Android 6.x seem to be present as well. Sometimes the situation seems to improve when Google VR Settings app is removed and the system gets rebooted.

jsantell commented 6 years ago

Moving Samsung resolution handling to fix incorrect distortions to https://github.com/googlevr/cardboard-vr-display/issues/7