I have a minor irritation in a jigsaw game I’m trying to put together in that grey lines occasionally appear at sprite edges. The sprite background colour is 255,255,255,255. The lines come and go as I zoom and pan around. I’ve highlighted some examples. Any ideas on how to stop this happening?
Are the tiles in a sprite atlas? If so, that could cause it.
Are they individual files?
Then check the original files
The tiles are loaded from individual png files. The edges only appear now and then so generally the transparency works well. The tiles are various sizes - should the number of pixel on a side of a bitmap be a multiple of, say, 4 or doesn’t it matter?
Yes, always use power of 2 dimensions (256, 512, etc).
Also disable mipmaps of they are enabled
Mipmaps weren’t enabled. I found that setting filtermode to ‘Point’ on the texture improved things a lot. Disabling antialiasing as well cured the problem completely (as far as my limited testing shows, anyway).
I wrote a c# application to generate the jigsaw pieces so I would need to hack that about to pad the tiles to powers of 2 pixels.
Thanks for your responses.
