You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
It seems the createPortal() call inside RenderTexture runs first with the original default camera, before GlobalCanvas has updated the r3f state with the new camera from the scroll-rig.
The r3f state gets updated with the correct camera after the first render - but at that point the state enclave for createPortal does not update to reflect it.
The sandbox above uses a dirty workaround by forcing a re-mount with the updated camera to make the children visible:
<MeshPortalMaterialkey={camera.fov}// force re-mount with proper camerablend={0.1}blur={0.1}transparentrenderPriority={1001}// render after globalcanvas to enable blend>
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: