APXEOLOG wrote:1. While packing textures into altas you can add 1px transparent border between them, so there will be no problems with filtering.
That's what I'm doing right now, but depending on perspective, it doesn't merely sample the immediately adjacent texels, but sometimes even further from that. It also has the rather grievous problem of preventing mipmapping, since subtextures are no longer aligned to power-of-two-coordinates.
APXEOLOG wrote:2. You can add(1, 1) to ul and sub(2, 2) from size of textures while binding it. So the pixels for filtering will be actually taken from this texture.
While being more mipmap-friendly, I can only assume it would have the same sampling problems as above. (And due to decreasing texture coordinate resolution in higher mipmap levels, the sampling problem would grow worse on said higher levels.)
APXEOLOG wrote:3. The best solution seems to use native glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_[S|T], *);
khronos.org wrote:GL_CLAMP causes s coordinates to be clamped to the range [0, 1] and is useful for preventing wrapping artifacts when mapping a single image onto an object. GL_CLAMP_TO_EDGE causes s coordinates to be clamped to the range [ 1/2N , 1 - 1/2N ] , where N is the size of the texture in the direction of clamping.
Well, the problem with that is indeed that it clamps to [0, 1], which is the range of the entire texture atlas, not the sub-parts of it that are used for individual tiles.