gl-react icon indicating copy to clipboard operation
gl-react copied to clipboard

Bad quality camera on Android devices

Open Benrski opened this issue 3 years ago • 5 comments

library version

├── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected] deduped
│ └── [email protected] deduped
├── [email protected]
└─┬ [email protected]
  └── [email protected] deduped

Expected behavior

iOS (using gl-react/GLCamera.js example) IMG_5298

This example from Expo it's working fine on both Android and iOS.

Actual behavior

Android (using gl-react/GLCamera.js example) Screenshot_20220709_131549_host exp exponent

Steps to reproduce the behavior

gl-react/GLCamera.js

Benrski avatar Jul 09 '22 11:07 Benrski

Did you try to increase the values of the camera at
https://github.com/gre/gl-react/blob/master/examples/cookbook-rn-shared/examples/camera/GLCamera.js#L54-L55 ?

            width: 400,
            height: 533.33,

thanks

gre avatar Jul 09 '22 20:07 gre

Changing the style works correctly, thanks! I didn't think the resolution depended on the style 🤔

Benrski avatar Jul 10 '22 10:07 Benrski

It's probably something specific to expo-camera

gre avatar Jul 10 '22 20:07 gre

Could it be related to webgltexture-loader-expo-camera?

Benrski avatar Jul 11 '22 08:07 Benrski

indeed here we use createCameraTextureAsync to get a picture of the camera from the "view", then I think it's due to the internal implementation of Expo, which will simply capturing the camera view https://github.com/expo/expo/blob/168ee43f71f005baa11edf98e518593443e1807a/packages/expo-gl/ios/EXGL/EXGLObjectManager.mm#L160

gre avatar Jul 11 '22 08:07 gre