2D Toolkit Forum

2D Toolkit => Support => Topic started by: Fome on August 26, 2015, 07:21:04 am

Title: Pixel Tearing - How to change materials?
Post by: Fome on August 26, 2015, 07:21:04 am
Hi all,

Completely lost and frustrated here, been searching high and low.

How does one change the material of an atlas so that my tilemaps can work with unity lighting and avoid pixel tearing?
I've heard that turning on pixel snap helps the issue, otherwise I'm lost.

Would appreciate any help.  Attached is a pic of the issue. You can see the odd lines between tiles.



Thanks.
Title: Re: Pixel Tearing - How to change materials?
Post by: Sickwitit on August 27, 2015, 07:39:48 pm
In your sprite collection settings, you can add new materials at the bottom. If you want light to respond, make a diffusive material, add it to the collection, then in the collection sprites, select the ones you want to change to diffuse material, change them. commit

Or do you mean dynamically?
Title: Re: Pixel Tearing - How to change materials?
Post by: unikronsoftware on August 27, 2015, 11:18:03 pm
You dont have to add a new material -
1. Make sure generate normals is seleced in sprite collection settings, and commit.
2. Find the material used by the sprite collection and change it to something lit.

To help reduce seams
1. Set the pad mode to extend on the sprites
2. Set padding amount to 1 or 2
3. Commit
Title: Re: Pixel Tearing - How to change materials?
Post by: Fome on August 31, 2015, 03:54:41 am
Setting the padding to 1 fixed all my problems.  Thank you.