Aframe resolution drops on mobile when exiting VR-mode - three.js

When switching back from VR-mode to 'normal' mode, the resolution of aframe scenes drop dramatically from about full HD to about 360p.
Not sure if this is at its core an Aframe, Three.js or general WebVR issue, but it seems to occur for every AFRAME application but not for other WebVR apps. The issue is encountered on the below mentioned android device, as well as at least one other android mobile and one iphone, but not on desktop browsers.
Image when entered into VR mode: resolution is 1820x1080
Image when exited VR mode: resolution changed to 640x360
Note that the above resolutions were obtained using:
AFRAME.scenes[0].renderer.getSize().width + "," + AFRAME.scenes[0].renderer.getSize().height + ", canvas: " + AFRAME.scenes[0].canvas.width + "," + AFRAME.scenes[0].canvas.height
Though this issue happens consistently for me, I can't find any mentions on it online. Any suggestion (as well as confirmation or rejection) is welcome!
Device info
AFRAME: 0.8.2
Browsers: Firefox and Chrome for android
Phone: Huawei P10 lite
Android: 7.0 (Nougat)

Got my solution over here; https://github.com/aframevr/aframe/issues/3592 which seems similar to #Tostifrosti's solution in issue 3354 of the same repo (though that one doesn't involve changing code in the aframe library).
The solution was to add the following line afer line 479 in a-scene.js
this.renderer.setPixelRatio(window.devicePixelRatio);

Related

How Can I Fix Glitchy Images on Google Chrome?

I would like to ask about these images I found to be glitchy on google chrome.
I must confirm that none of these are intentional.
This started since I saw a glitchy image on my google classroom, here are some images I found to be glitchy. I don't seems to find a pattern from them.
Glitchy image on google classroom
How the google classroom image should look like (my friend's perspective)
Broken logos of chrome extensions (fullscreen)
Broken search icon
Broken pdf icon on web.whatsapp.com
It sometimes manages to fix itself though, I successfully took a screenshot of glitchy icons and the normal ones.
Search Icons, both normal and glitchy displayed at the same time
I've tried to delete images cache and even reinstalled chrome, none of them works to fix this problem.
Some information that might help narrow down the problem:
I've recently used this PC with a new SSD (I've used it for about a month now), which contains the chrome itself, and it works properly so far. I don't think this should be a problem with the disk. (please correct me if I'm wrong)
However, on the day this happens, I installed the React Devtool (I've deleted it though) (https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi) and the Redux Devtools (https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd)
Can this problem be a bug on the chrome itself, or perhaps something related with skia? Should I report this as a problem to Chrome, or is this a problem on my end?
Information about my OS and Google Chrome (I'll provide more if it is required):
OS:
Edition: Windows 10 Pro
Version: 20H2
Installed on: ‎1/‎10/‎2022
OS build: 19042.1526
Experience: Windows Feature Experience Pack 120.2212.4170.0
Chrome:
Version: 98.0.4758.102 (Official Build) (64-bit)
Thanks
EDIT: Fixed, I changed from using GPU 0 to GPU 1 via settings, is this a graphics card compatibility issue?
GPU 0: Intel(R) HD Graphics 530
GPU 1: NVIDIA GeForce GTX 950M
Setting "Choose ANGLE graphics backend" (chrome flag) to "OpenGL" fixed the issue for me.

Aframe not working with Vive and Firefox on Windows 10

I can't get to work my code or even the examples provided on http://aframe.io/examples/ on HTC Vive and Firefox 59.0.2 (Windows 10 on a MSI laptop computer with GTX 1060, Geforce drivers 3.13.1.30). Tried also with Firefox Nightly.
The scene loads and the controllers are visible. The headset is not tracked and does not change the scene. Then SteamVR starts and shows a "firefox.exe unresponsive" message. From this point, if I enter VR mode, the headset is not tracked.
Go to NVIDIA Control Panel and set Firefox to use with High Performance Mode. The laptop is probably falling back to integrated graphics.
If you use a VR browser like Supermedium, this is automatically handled for you.

ThreeJS mobile device-orientation: Chrome gets laggy, opening Firefox fixes it

I have a mobile ThreeJS scene based on device orientation that goes quite good on Android devices (55 fps). After some time performance starts to drop badly, but this is not reflected in the FPS, only in the smoothness of the device orientation detection. And only here, because if I leave the phone on a desk (so device orientation doesn´t play any role) the rest of the code works fine and smooth as expected.
I noticed that closing the browser or even restarting the device doesn´t fix the lack of smoothness. In a moment of dispair, I tried the same script on Firefox mobile, and it was smooth. Going back to Chrome, the problem seemed to be fixed (!).
So every time Chrome gets this lag, I open Firefox to solve it, the weirdest thing. What is happening here? How can I prevent it? Also how can be possible that the fps continue being so high but the device orientation goes so laggy?
If I remember well, this started to happen after using layers on my code (combined with the StereoEffect I was already using). Does this have any sense for anybody? I´m sooo stuck on this.. Any clue will be appreciated.

WebVR supported, but no VRDisplays found, suddnly

When I develop webVr content using A-frame , web vr work probably with oculus rift using nightly browser (powered by firefox)
Then after 1 day I restart my computer , Then non of web vr experience work (developed by me or by other ) in nightly browser .
when i test using
https://webvr.info/samples/test-vr-links.html
The message "WebVR supported, but no VRDisplays found."
so i have problem i don't know where it .
->then I install firefox developer edition (it support web vr)
and I try test , it work probably then crash message from browser appears
so what can I do with this problem ? any solution ?
Note :
-I use web vr and I try it many times this problem doesn't appear
- all oculus experiences from store work
-actually I uninstalled and installed Nightly ,this step doesn't solve the problem .
Have you ever tried installing WebVR Emulation plugin in your Chrome Browser?
With the Emulation plugin, you don't even need the VR device like Oculus Rift, which kind of handy for development directly on desktop non-nightly browser.

OpenGL problems with ARC (Android apps on Chrome)

We are seeing a lot of OpenGL problems with our Android app running under ARC on either Chrome on the desktop or on Chromebook.
We use OpenGL ES1 for our drawing. This same code works fine on iOS, Android and Mac. However when running under ARC we see blank rectangles where our text should be. Other drawing comes out at a vastly wrong scale. There are lots of obscure OpenGL errors in the Logcat.
Are others having these problems? I was wondering if it was because we are still using OpenGL ES1.
ARC is still in Beta so I wouldn't expect things to run flawlessly. Try updating your graphics drivers. That should do the trick.
[https://downloadcenter.intel.com/search?keyword=2nd+Generation+Intel%C2%AE+Core%E2%84%A2+Processors+with+Intel%C2%AE+HD+Graphics+3000%2F2000][1]

Resources