Enabling transparency on objects rendered to render texture makes them disappear completely on iOS - React Three Fiber

19 views Asked by At

In React Three Fiber, I'm rendering objects to a render texture in a separate scene using an orthogonal camera, and I want to use that texture back in my main scene in a custom shader. I have this all set up and functioning well, and I can see the objects rendered to the texture in the main scene on my Macbook pro, iPhone, and Galaxy S23. However as soon as I add any kind of blending on the objects being rendered in the separate scene i.e. enabling transparency, or changing the blend mode to anything other than THREE.NormalBlending, my objects completely disappear and are no longer rendered to the texture on my iPhone only. I don't see this same issue on other devices.

I’ve tested passing the texture into a meshBasicMaterial as well and encountered the same problem, so I know its not my shader causing the issue. I’ve also played with many of the renderer and material settings, but nothing so far has remedied this issue. I’m not sure if there is a setting that would fix this, or if it’s just a bug?

I have a sandbox here with an example. You can toggle the transparency (opacity is still 1 so there should not be a visible difference). Again you will have to open it on an iPhone to see the object disappear: https://codesandbox.io/p/sandbox/render-texture-ios-kswxkc

Any insights would be greatly appreciated!

0

There are 0 answers