2D Toolkit Forum
2D Toolkit => Support => Topic started by: Quells122 on May 31, 2015, 06:02:19 am
-
Recently, I was able to become an approved developer for a console (not sure if NDA'ed). In order for my game to be console compatible, I had to update my Unity version from 4.6.0 to 5.0.1.
Sadly changing versions seems to cause me problems with the tilemap lighting. I've attached a picture to demonstrate what I mean:
The tilemaps use the shader "tk2d/LitBlendVertexColor".
Is this a known issue? Any idea on how to fix? Help is greatly appreciated!
(https://lh3.googleusercontent.com/NUKkBliMLQwFo_gvcX71MwTdxctDFVzDbP4di17g2co=w922-h1075-no)
-
Have you updated to the latest 2D Toolkit as well?
-
Yes. I re-imported the latest 2D toolkit from the Asset Store
-
I haven't tested it on whatever platform you're on, but I have heard of / seen some issues with the vertex lit path in Unity 5.x. Try it with other modes (deferred / forward) and see if it works any better?
-
Unfortunately, changing to other modes like deferred does not work any better (it was on forward initially).
What seems to have "sorta" work, is if I change the tilemap's atlas material shader to "Sprites/Diffuse". However, it introduces another problem. The tilemap and the sprites are no longer evenly lit. Either the character is lit or the tilemap is lit. Animated tiles such as water need to be evenly lit with the tilemap or else they stick out like a sore thumb. Is there anything else I can do?
(https://lh3.googleusercontent.com/FphMosaddR99gWjqzXbO4lJPLVIsjVg0IgWfRSc5r64=w815-h1032-no)
-
I'm running out of ideas. tk2d meshes are no different to Unity meshes. With any lit shader, you'd expect them to behave as any other object is lit. I guess you could try this with the Unity default shader, and make sure the normal generation is turned on in the sprite collection settings...
-
Thanks! Turning on normal generation seems to have done the trick. The tilemaps now respond to light and is evenly lit with other sprites.
I am curious what normal generation does and if there are any disbenefits to having it on? It seems to run with the same stats as before...
-
Normals are required for lighting. The vertex data is a bit bigger but shouldn't make any noticable difference here. It might have been working by chance before that, but it shouldn't have :)