gre / gl-react

gl-react – React library to write and compose WebGL shaders
https://gl-react-cookbook.surge.sh
MIT License
2.95k stars 163 forks source link

expo-gl-react-camera-effects example does not render the camera feed on expo v30 #204

Closed bberak closed 4 years ago

bberak commented 5 years ago

bug report

The expo-gl-react-camera-effects example does not render the camera feed on expo v30. I'm running the example on the Expo app on an iOS device (iPhone SE on iOS 12).

library version

├── gl-react@3.15.0
└── gl-react-expo@3.16.3

Expected behavior

Running the expo-gl-react-camera-effects example with expo v30 should render a camera view with a live feed from the camera that can be altered using the sliders (effects).

Actual behavior

The camera feed does not render at all. The sliders DO render. I've tried this with expo 30+. I noticed that in expo 29 they removed GPUImage - not sure if this makes a difference. Note, that the example works perfectly fine on expo 27.

Steps to reproduce the behavior

npm install -g expo-cli
git clone https://github.com/bberak/gl-react.git
cd gl-react/examples/expo-gl-react-camera-effects
npm install
npm run start  # Follow the prompts to open the example on your Expo app

Please let me know if I can provide more info or a more detailed step-by-step explanation.

Huge thanks

PS, just wanted to say thanks for all the work you've put into gl-react and your other projects, they've made a huge impact on the RN community at large. Many thanks.

Benjamin-Willard commented 5 years ago

I am having same issue with Expo 32 where GLImage is not working (gl-react-image) where it just doesn't render.

torreyleonard commented 5 years ago

Same issue with the latest version of Expo. Tried using the example and within my project. Both times I have the same error output:

webgltexture-loader-expo: ExponentGLObjectManager.createCameraTextureAsync is not available. Make sure to use the correct version of Expo webgltexture-loader-expo: ExponentGLObjectManager.createObjectAsync is not available. Make sure to use the correct version of Expo

Followed by the entire Expo Camera object:

Node#23(YFlip#2), uniform t: no loader found for value, Camera { ...

gre commented 4 years ago

the libs and examples was updated and it's now working

wigggles commented 4 years ago

I'm still running into issues with the samples:

LOG  <GLCamera flashMode={0} onCameraReady={[Function onCameraReady]} onCameraRef={[Function onCameraRef]} onFacesDetected={[Function onFacesDetected]} type={0} whiteBalance={0} />
 WARN  Node#96(YFlip#12), uniform t: no loader found for value {"_cameraHandle": 2179, "_cameraRef": {"_children": [], "_nativeTag": 2179, "viewConfig": {"NativeProps": [Object],

That can't find uniform T in GLSL string. Followed by the entire camera child component.

demirhancosku commented 4 years ago

@wigggles I think you're missing this; https://github.com/gre/gl-react/blob/master/examples/expo-gl-react-camera-effects/App.js#L1