-
Notifications
You must be signed in to change notification settings - Fork 38
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
Drei MeshPortalMaterial with GlobalCanvas not displaying correctly #32
Comments
Thanks for reporting! Haven't tried this material but will look into it and report back ⏳ |
Hi @CadotV - check this out: https://codesandbox.io/p/devbox/r3f-scroll-rig-with-meshportalmaterial-bug-forked-mrzdll It seems the The r3f state gets updated with the correct camera after the first render - but at that point the state enclave for The sandbox above uses a dirty workaround by forcing a re-mount with the updated camera to make the children visible: <MeshPortalMaterial
key={camera.fov} // force re-mount with proper camera
blend={0.1}
blur={0.1}
transparent
renderPriority={1001} // render after globalcanvas to enable blend
> |
@CodyJasonBennett or @drcmda do you know a better way to override the default camera before any Currently we call |
@ffdead would the |
We already use that, we've copied the maDefault logic from the Drei cameras:
But seems it runs too late somehow 🤔 |
When using components directly inside the GlobalCanvas (without useCanvas hook or scrollScene), the meshPortalMaterial only display after saving the file by adding / removing another mesh.
I tried enabling all layers for the main camera, and some few things with gl but without success.
Might be the default render loop from the GlobalRenderer, but i'm a noob with Three.
Here is a repo to see it in action by comment/uncomment the sphere mesh.
codesandbox
The text was updated successfully, but these errors were encountered: