Author Topic: Depth Issue when using Multiple Atlases that use the same Texture  (Read 4626 times)

csykora

  • Guest
Ok so first off what I'm trying to do is have different shaders for one atlas texture. For instance a grayscale shader or one that doesn't cut out the alpha. I am accomplishing this by creating a new Atlas and Material whose texture references my other atlas texture. The new shader is used on the new Material. This allows me to have only 1 texture which is what I want.

The problem comes when I try to use Depth on a sprite that uses this new Atlas. Depth works properly when used against other sprites in the same New Atlas but is completely useless when trying to use it with other Atlases. I am forced to use z in this case to get it to draw in front.

Am I doing something wrong? Is this not a good way of applying shaders to an entire atlas texture?

Thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Depth Issue when using Multiple Atlases that use the same Texture
« Reply #1 on: November 06, 2013, 09:09:50 AM »
Sounds like you are using NGUI 2.7.0 or earlier.

csykora

  • Guest
Re: Depth Issue when using Multiple Atlases that use the same Texture
« Reply #2 on: November 06, 2013, 09:33:25 AM »
Hey Aren,

I am actually using 3.0.3. I just figured out that the problem is in the new shader I'm trying to use which makes sense.