Comments (6)
lol figured it out... just add this line before building the renderer, works on both platforms:
gl.createRenderbuffer = (() => ({}));
https://snack.expo.io/@bacon/three-shadows
from expo-three.
This problem came in SDK 25 when we shifted to using the native iOS framebuffer. I haven't tested to see if this was fixed in 26 - where we added support for OpenGL-ES 3 / WebGL 2.0.
from expo-three.
I have the same problem at SDK 26, tried downgrading to expo SDK 24 and then SDK 23 but the issue remained to me. Can you confirm? @EvanBacon
from expo-three.
@SvenJonsson unfortunately EXGL versions work a little differently than the rest of Expo. EXGL is C++ that is used across both android and iOS, then bridged through the respective platforms, so downgrading doesn't work the same.
I'll take another stab at this tonight.
from expo-three.
Hi @EvanBacon and @oosmoxiecode,
Did you find anything fishing going on with the z-depth/buffer after applying this fix?
Specifically, I'm finding the z-order gets messed up when using this fix and the EffectComposer with at least one shader pass.
Here is what my app looks like without any shader passes being applied. Notice the orange box gets rendered behind the blue platform when it falls.
Here is the same code with an additional sepia shader pass added to the effect composer. Notice that the box gets rendered incorrectly in front of the platform when it falls.
Removing the gl.createRenderbuffer = (() => ({}));
line fixes the z-depth issue, but it causes other problems with shadows and some other shaders down the line.
I've tried this on both Expo SDK 27 and Expo SDK 31 - I get the same results.
Thanks in advance for any ideas/clues - and many thanks for all your work.
from expo-three.
Hey guys, sorry for late reaction, but this issue comes like a boomerang so I investigated it more now 😄
My guess is that it's a duplicate of expo/expo#7502, so please see my comment there: expo/expo#7502 (comment)
If anyone is still working on it and can let me know whether the workaround works I'd be very grateful 🙏
EDIT: Of course gl.createRenderbuffer = (() => ({}));
workaround is no longer valid, please use only the one from the comment mentioned above.
from expo-three.
Related Issues (20)
- Cannot use TextureLoader Expo SDK 45. HOT 1
- Can't load GLTF model because readasarraybuffer is not implemented HOT 1
- Obj, mtl File Could be not read HOT 1
- Broken Examples HOT 1
- create-react-native-app with R3F has mismatched dependencies HOT 1
- iOS white screen - expo-three setup HOT 1
- Unable to render .glb/.gltf files on mobile HOT 3
- WARNING: Multiple instances of Three.js being imported HOT 5
- Eas android black screen
- Possible Unhandled Promise Rejection (id: 0): ReferenceError: Can't find variable: BoxBufferGeometry
- @kyaroru Thank you for your example. Update Example
- Please update to expo 47 HOT 4
- Can't find variable: HTMLElement HOT 1
- Ignore `gl.pixelStorei` warning HOT 2
- iOS support for morph targets
- AVIF and WEBP texture support
- GLB/GLTF
- texture based on file:// url won't load HOT 3
- How to upgrade expo-three to use the latest version of three.js HOT 1
- Has this library been discontinued? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from expo-three.