scene background overrides the createPortal() child mesh's material #1260
Replies: 2 comments 1 reply
-
i think this isnt a bug, its just render behaviour and edge-cases. portalling is useland as well, there's nothing that r3f could do for you imo. |
Beta Was this translation helpful? Give feedback.
-
I don't think this is related to You can fix this by passing the second argument to |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am trying to use
createPortal()
to render fixed mesh on the scene.Now if I have a
<color/>
attached to the background scene, the aboveHUD
display is not rendered.A work around,
Basically the above code swaps the background of the actual scene and applies to the virtual scene. Doing so, the mesh is displayed.
The problem arises when there is a texture applied to the background of the actual scene. In that case, the mesh material is the same as the background.
Here is the sandbox
Is there something I am missing?
Beta Was this translation helpful? Give feedback.
All reactions