Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: patrickkidd on August 18, 2013, 10:53:26 PM

Title: NGUI incorrectly adding shadows to transparent pngs?
Post by: patrickkidd on August 18, 2013, 10:53:26 PM
I am adding transparent PNGs to my atlas and finding that NGUI is replacing some of the semi-transparent white around the outsides with a dark color, which makes it look like a shadow. Is there any way to get NGUI to use the exact pixel data in the image to it looks the same as the artist designed it?

I've attached 2 of the originals with white highlights around the top edge, the intended noisy-white background image, and the generated atlas texture with the white highlights replaced by darker highlights as generated by NGUI.

Thanks!
Title: Re: NGUI incorrectly adding shadows to transparent pngs?
Post by: lime-green.at on August 19, 2013, 01:23:48 AM
Tested it, can't see the problem:

(http://s3.imgimg.de/uploads/imga38f7c7apng.png)
Title: Re: NGUI incorrectly adding shadows to transparent pngs?
Post by: ArenMook on August 19, 2013, 09:06:17 AM
You need to use Unity 4.2+ if you're using PNGs, and have "alpha is transparency" checkbox checked on texture import settings.

PNGs treat transparent pixels as white color by default.
Title: Re: NGUI incorrectly adding shadows to transparent pngs?
Post by: patrickkidd on August 19, 2013, 01:07:30 PM
I upgraded to 4.2 and that fixed it. Thanks!