[SOLVED] Artifacts on edges of non-adjacent UV blocks (tilemap pixel shader)

Hi, I’m trying to make a tilemap shader, but get weird artifacts on the edges of tiles (the picture shows an isometric tile shape, but the artifacts can be seen at any tile shapes, even plain old square grids).

The calculated tilemap UVs (in the second picture) do not exhibit this glitch, so I suspect something is wrong in the tex2D() call.

An idea why this is happening / how to fix it?


3137590--237931--UVs.png

3137590–237932–TileMapTest.zip (499 KB)

Yes, the interpolation between fragments cannot correctly compute the intermediate value when the jump between fragment is too big. Might only work with point base sampling or pingpong sampling, not random jump in the UV.

tex2Dgrad() is your friend here, or disabling mip maps if that’s an option.

Thanks! Disabling mipmaps works for me.