k2d222 / twwe

Teeworlds collaborative map editor online

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Texture interpolation for texture atlases

k2d222 opened this issue · comments

the antialiasing causes wrong colors on the tiles edges, because neighboring tiles in the texture atlas are interpolated with current tile.

One fix possible is to generate custom mipmaps that don't interpolate at tiles edges. Another fix is to bias texture coords inwards, but this must be done dynamically because the bias factor changes based on zoom level.

Might be possible to do in the fragment shader with mipmaping disabled? Needs investigation.