Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Depth testing for GUI stuff?

Discussion in 'Editor & General Support' started by metervara, Dec 6, 2006.

  1. metervara

    metervara

    Joined:
    Jun 15, 2006
    Posts:
    203
    I'm looking for ways to have my GUI elements (Text + Textures) depth sorting with other non-gui gameobjects.

    My first thought is shaders, but for GUI-textures there's no material property and therefore no accessible shader. GUI-texts have materials so I'm guessing it would work with a shader here? Is that correct?

    Ideas?
     
  2. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    That can be hard... IIRC, we render all GUI Texts at the same distance (zero) in Z. So even with a custom shader it might not work.