#Tilemap texture shader not pixel perfect

1 messages · Page 1 of 1 (latest)

clear plover
#

hey! im a total noob with shaders, using a basic one to swap the texture used by a tilemaplayer. but, im getting this strange squishing/artifacting on the edge of every tile. does anybody know why..? :,>

vale mist
#

texture padding tileset property converts the texture when it's loaded. A 128x tilemap with 16x tiles secretly becomes a 144x with 18x tiles. Equivalent of exporting a tileset with a 1 pixel inner extrude.

clear plover
#

hmmm..

vale mist
#

The tileset settings would be margin=1,1;spacing=2,2;padding=false if you want to provide it with a pre-extruded tileset.

Disabling padding altogether is an option if you can guarantee the tilemaplayer and camera will never stray from the viewport's pixel grid. Considering the shader is asking for mipmapping, that's probably not the case!

clear plover
#

Wrote a script to align to viewport pixels, it looks a little snappy but honestly that might be fine as long as this works

vale mist