I’m using OpenGL to draw a city map in a 2D game. The player can zoom out, to see most of the city, or zoom way in, to see individual people walking around the city.
The city map is stored on disk simply as a single large texture, with possibly non-power-of-two dimensions. My strategy was to break up the image into NxN squares and render each square as a quad.
This looks fine for nearest-neighbor magnification, but when i switch to linear magnification, I get ugly artifacts at the edges of the tiles.
I assume this is because the linear filter is doing a weighted average of the nearest four texels, and since I’ve split the image into tiles there is a discontinuity between the texels available on one side of a tile boundary and those on the other.
I think I could solve the problem by adding a 1 pixel border around the tile texture, but this seems very wasteful.
My question is, what’s a good way to manage the display of very large images like this?
The map images themselves are sizes around 1200x1200.