2D Toolkit Forum

2D Toolkit => Support => Topic started by: Afro-Ninja on July 25, 2013, 10:31:40 pm

Title: Changing shader for tilemap (lighting)
Post by: Afro-Ninja on July 25, 2013, 10:31:40 pm
I searched and found this topic:

http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,1080.msg5241.html#msg5241

and just wanted to know if there was any follow up to it, or any changes/fixes since this release.
should I still do what maas suggests and just comment that line so the normals are always recalculated?
Title: Re: Changing shader for tilemap (lighting)
Post by: unikronsoftware on July 25, 2013, 11:09:40 pm
You still need to call RecalculateNormals.
Title: Re: Changing shader for tilemap (lighting)
Post by: Pfaeff on August 20, 2013, 11:06:08 am
I wanted to enable lighting for my tilemaps. What I did, was simply add
Code: [Select]
chunk.mesh.RecalculateNormals();below
Code: [Select]
chunk.mesh.RecalculateBounds();in the BuildForChunkRoutine and it seems to work just fine.