Hello Guest

Author Topic: Cutout shaders cause tile distortion  (Read 4680 times)

zeteginara

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 38
    • View Profile
Cutout shaders cause tile distortion
« on: December 28, 2014, 11:32:04 pm »
I switched the material of one of my tilemaps to use the tk2d CutoutVertexColor shader, and now a few of the tiles seem to 'pick up' parts of other tiles.

You can see some examples in the texture view here:

This one:

And this one:


It doesn't get obvious until you see it in game:

Like this:

Or this:


It's really weird because I have a couple other tilesets in my game that use the CutoutVertexColor shader and the same settings, and they don't have this problem.  Did I miss something, or have I actually found a bug?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Cutout shaders cause tile distortion
« Reply #1 on: December 29, 2014, 10:04:40 am »
Check that you have 1 pixel of padding in sprite collection settings, that will almost certainly help with this. Also open up the image in photoshop and look at the colors / alpha channel, make sure there arent pixely bits with weird alpha values in there...

zeteginara

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: Cutout shaders cause tile distortion
« Reply #2 on: December 29, 2014, 11:07:37 pm »
Solved.  Using Paint.NET, with the wand at 10% tolerance, I deleted all the crap that was apparently in the alpha channel.