2D Toolkit Forum

2D Toolkit => Support => Topic started by: w4dg on April 02, 2013, 03:13:31 am

Title: Lighting does not affect sprites
Post by: w4dg on April 02, 2013, 03:13:31 am
I was able to find a few other support threads with similar issues, but their solutions didn't seem to help me. I have:


In both cases, the sprite is simply invisible. Nonlit shaders appear to work just fine. The sprite in question is attached to the player controller. I love the organization of this add-on, by the way. You've done a great job.
Title: Re: Lighting does not affect sprites
Post by: unikronsoftware on April 02, 2013, 12:08:47 pm
This should just work after setting normal generation to true + shader to litblendvertexcolor.
Have you tried any of the default Unity shaders? What happens there?
Title: Re: Lighting does not affect sprites
Post by: w4dg on April 02, 2013, 06:15:50 pm
All of the default shaders result in either a black rectangle covering the entire area of the sprite, or something completely invisible.

= /
Title: Re: Lighting does not affect sprites
Post by: w4dg on April 02, 2013, 06:19:56 pm
Wow! I just hit "Reset Shaders" and reselected my texture and now it's working!

For anyone else having this problem, Reset Shaders is in the options (the little gear) to the upper right of your material atlas.
Title: Re: Lighting does not affect sprites
Post by: unikronsoftware on April 03, 2013, 03:21:34 pm
How bizzare.
Never seen this issue before. Perhaps the material was set up incorrectly intially.

Thanks for sharing.