Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: csykora on November 05, 2013, 04:44:37 PM

Title: Depth Issue when using Multiple Atlases that use the same Texture
Post by: csykora on November 05, 2013, 04:44:37 PM
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
Title: Re: Depth Issue when using Multiple Atlases that use the same Texture
Post by: ArenMook on November 06, 2013, 09:09:50 AM
Sounds like you are using NGUI 2.7.0 or earlier.
Title: Re: Depth Issue when using Multiple Atlases that use the same Texture
Post by: csykora 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.