DevFear
Topic Author
Posts: 18
Joined: 29 Jun 2022, 12:36

The order of rendering with Unity UI

08 Sep 2022, 11:11

I am working on the transition from the classic Unity UI to Noesis. I noticed that the elements from Unity UI are displayed on top of the elements from Noesis. Is it possible to globally change the rendering order?
 
User avatar
jsantos
Site Admin
Posts: 3545
Joined: 20 Jan 2012, 17:18
Contact:

Re: The order of rendering with Unity UI

08 Sep 2022, 11:22

Similar to using post-processing you can use camera-stacking (several cameras rendering to the same screen) to play with the order of elements and "when" Noesis renders.
 
DevFear
Topic Author
Posts: 18
Joined: 29 Jun 2022, 12:36

Re: The order of rendering with Unity UI

14 Sep 2022, 20:40

And what if the project is made on HDRP?
 
User avatar
jsantos
Site Admin
Posts: 3545
Joined: 20 Jan 2012, 17:18
Contact:

Re: The order of rendering with Unity UI

15 Sep 2022, 10:31

The link I posted above gives you instructions for Legacy, Universal and High Definition pipelines.
 
DevFear
Topic Author
Posts: 18
Joined: 29 Jun 2022, 12:36

Re: The order of rendering with Unity UI

15 Sep 2022, 11:19

I'm sorry, but maybe I didn't quite understand the instructions. In the example, the red square is the Canvas Unity image. The exit window is the Noesis element. As you can see, the square is still drawn on top.
Image
Image
 
User avatar
jsantos
Site Admin
Posts: 3545
Joined: 20 Jan 2012, 17:18
Contact:

Re: The order of rendering with Unity UI

15 Sep 2022, 12:20

Yes the idea is:
  • Rendering Unity UI to a camera
  • Render Noesis View to a different camera
Use the instructions in the given link to decide the order of those two cameras. Note that both cameras are rendering to the same screen.

I haven't tried this with Unity UI, but I think it should work.
 
DevFear
Topic Author
Posts: 18
Joined: 29 Jun 2022, 12:36

Re: The order of rendering with Unity UI

15 Sep 2022, 13:55

Does not work. I tried all the combinations. CustomPass Noesis works before the Unity UI render is triggered.
Image
 
User avatar
jsantos
Site Admin
Posts: 3545
Joined: 20 Jan 2012, 17:18
Contact:

Re: The order of rendering with Unity UI

16 Sep 2022, 10:49

I think you need to move the Unity UI to another custom pass, that way you can control if it renders before or after noesis.
 
DevFear
Topic Author
Posts: 18
Joined: 29 Jun 2022, 12:36

Re: The order of rendering with Unity UI

19 Sep 2022, 13:20

What do you mean? Is this really possible?
 
User avatar
jsantos
Site Admin
Posts: 3545
Joined: 20 Jan 2012, 17:18
Contact:

Re: The order of rendering with Unity UI

20 Sep 2022, 16:35

I am not an expert on Unity UI, and you probably need to get help on Unity forums. But yes, I think it must be possible to achieve that.

Who is online

Users browsing this forum: No registered users and 0 guests