I have a Render Texture for a mini HUD for the center console of my cockpit. I want a UI to be displayed there so I decided to use the Unity UI interface. The HUD on the center console is via a Render Texture. I used a simple image to test out the scaling and when I move my ship the image flickers in an out of phase.
I tried changing the clipping, and plane distance with no solution. I really need the UI to work on the center console as it is crucial for in-game feedback.
If anyone has experienced this problem and has a fix I would be indebted, thanks!
Specs
OS: Windows 8.1 Pro x64 (Bootcamp → MacBook Pro late 2014)
Hardware
CPU: i7-4558U 2.8 GHz
RAM: 16GBs
SSD: 500 GBs
GPU: Intel Iris Pro (Possible GPU problem who knows)
Unity: 5.2.3F1
Is the flickering z fighting between the console and the texture? Its hard to say without seeing it.can you not use a world canvas instead of render texture?
Thank you for getting back to me. I am working on Bootcamp so I don’t have a native screen capture.
Here is a screenshot, imagine the Red Square jittering ever so slightly as if it was ‘catching’ up, similar to how some cameras get jitter when following a player in Update when they move in FixedUpdate. And I did notice the Z axis for w/e reason was changing between -0.1 and 0.1. Here is the Hierarchy View.
Here is a video, sorry did it with my phone.
Its likely a issue with when the rendertexture is rendered. I’d try rendering that camera manually in a update loop to see if that helps.
1 Like
I have the same problem and have found that rendering in the Update loop manually does solve the problem.
However, I’m a little confused by this in general. Why doesn’t it work in the normal Mono lifecycle? usually all of my monos update and I don’t control the order. So I can set this mono to update later, but I feel like normally there is a clear Update then Render flow.
Even when I flip a bool and then wait until the next frame and flip it back, the render texture gets garbage in it. It only works when I manually call render from the update loop.
Why does it make sense to call Render from the update loop and not somewhere else?