- Home /
render ui to texture
I am trying to create an effect where I have two 'worlds' in parallel, with each being rendered to a separate RenderTexture and then a shader mixes between the two to render them to the screen (via a third camera). The shader works to switch between the two worlds and the other objects are showing up, but none of the UI elements are.
The camera for WorldA only sees the WorldA layer, and the UI elements for WorldA are all on this layer, but they don't show up on the render texture (same for WorldB). I've checked they are in the camera's view frustum but they are still not rendering. I've tried all three canvas modes, but still nothing.
I'm using Unity 2017.3
Ok, so after a bit more time trying to figure this out, setting the canvas to the WorldA layer makes it show up in the WorldA camera's output, but the problem now is that the children of the canvas that are set to WorldB are also rendering onto the WorldA camera. Is there a way to accomplish this without using multiple canvases?
Your answer
![](https://koobas.hobune.stream/wayback/20220612144237im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to draw dynamically on a UI Panel 1 Answer
Display canvas on in game monitor 1 Answer
How to make the camera render RenderTexture if the camera is in another scene? 1 Answer
Load Render Textures into Raw Image Object via C# 1 Answer
Use the canvas scaler to resize UI on a RenderTexture's resolution ? 0 Answers