Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad quality camera on Android devices #412

Open
Benrski opened this issue Jul 9, 2022 · 5 comments
Open

Bad quality camera on Android devices #412

Benrski opened this issue Jul 9, 2022 · 5 comments

Comments

@Benrski
Copy link

Benrski commented Jul 9, 2022

library version

├── expo-camera@12.2.0
├── expo-gl@11.3.0
├─┬ gl-react-expo@5.2.1
│ ├── expo-gl@11.3.0 deduped
│ └── gl-react@5.2.0 deduped
├── gl-react@5.2.0
└─┬ webgltexture-loader-expo-camera@2.0.0
  └── expo-camera@12.2.0 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

@gre
Copy link
Owner

gre commented Jul 9, 2022

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

@Benrski
Copy link
Author

Benrski commented Jul 10, 2022

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

@gre
Copy link
Owner

gre commented Jul 10, 2022

It's probably something specific to expo-camera

@Benrski
Copy link
Author

Benrski commented Jul 11, 2022

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

@gre
Copy link
Owner

gre commented Jul 11, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants