2D Toolkit Forum
2D Toolkit => Support => Topic started by: Demonocrat on September 21, 2013, 10:27:06 am
-
Hello!
I have issue with litting my tiled sprite in the scene.
I have "letblindVertexColor" set and "normals only" enabled on atlas with my background sprites.
When i create single sprite from this atlas it lits fine from light sources, but when i try to create tiled sprite from the same atlas it stays dark and ignores all light sources in the scene.
What might be the issue?
-
Tiled sprites don't create vertex normals required for lighting. Add the line in bold to tk2dTiledSprite.cs and lighting will then work.
mesh.RecalculateBounds();
mesh.RecalculateNormals();
mesh.bounds = AdjustedMeshBounds( mesh.bounds, renderLayer );
-
It worked!
Thanks alot!