detect-gpu icon indicating copy to clipboard operation
detect-gpu copied to clipboard

Properly handling VR headset

Open ema2159 opened this issue 3 years ago • 2 comments

Hi! I am currently working with an Occulus Quest 2 and I am trying to use detect-gpu for 3D visualization in order to manage the level of detail of the meshes that will be loaded in the scene. However, it seems that detect-gpu doesn't handle this type of device properly, since, besides the GPU field, all the other fields don't give correct information. The one field that has the biggest impact is the isMobile one since it is being labeled as false but a VR headset's hardware is much closer to a mobile device than a PC.

Is there something to be done?

ema2159 avatar Jul 26 '21 14:07 ema2159

Hi, thanks for your report. Could you provide me the output you are currently getting, the user agent of the Occulus Quest 2 and the expected output? You can use https://webglreport.com/ to get all of those.

TimvanScherpenzeel avatar Jul 26 '21 15:07 TimvanScherpenzeel

I think I see the problem. The issue is that the Oculus browser has two modes, a "Desktop" and the "Mobile" modes, which makes it difficult to properly manage. This is the UA given by the Oculus:

Mozilla/5.0 (Linux; Android 10; Quest 2) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/15.0.0.0.22.280317669 SamsungBrowser/4.0 Chrome/89.0.4389.90 VR Safari/537.36

Lastly, for the desktop mode this is the given output:

{ "gpu": "adreno (tm) 650", "isMobile": false, "tier": 1, "type": "FALLBACK" }

and for mobile mode:

{ "fps": 108.3, "gpu": "qualcomm adreno 650" "isMobile": true, "tier": 3, "type": "BENCHMARK" }

The thing is, is there any way of being able to properly manage VR devices independently of whether mobile or desktop mode is being used?

ema2159 avatar Jul 27 '21 10:07 ema2159