- Home /
Distance based lighting
In my game, the world is 3D but most of other stuff are 2D Sprites(quad mesh). They all have the below line in their Update() method to always look at Camera. transform.rotation=Camera.main.transform.rotation;
The problem is, lighting effect always look weird on them in certain camera angles since they really are just like paper. Is there any way to have them receive lighting effect while not taking their direction(rotation) into account? Basically, I want them to have equal amount of lighting no matter which side of quad mesh lighting is applied.
I'm using deferred lighting so that might make things more complicated -.-
Answer by MakeCodeNow · May 21, 2014 at 09:27 PM
You'll need to write your own shaders for them. Check out the surface shader documentation, specifically the bits on custom lighting functions.