I'm working on a 2D game using OpenGL 1.5 that uses rather large textures. I'm seeing aliasing effects and am wondering how to tackle those.

I'm finding lots of material about antialiasing in 3D games, but I don't see how most of that applies to 2D games - e.g. antisoptric filtering seems to make no sense, FSAA doesn't sound like the best bet either.

I suppose this means texture filtering is my best option?

Right now I'm using bilinear filtering, I think:


From what I've read, I'd have to use mipmaps to use trilinear filtering, which would drive memory usage up, so I'd rather not.

I know the final sizes of all the textures when they are loaded, so can't I somehow size them correctly at that point? (Using some form of texture filtering).

  • \$\begingroup\$ You really should add mipmaps for your textures, at least some of them, it will improve visual quality. Other than that, aliasing is usually on the polygon level, so you could use some image-space antialiasing technique to optimize the textures quality. \$\endgroup\$
    – Grimshaw
    May 7, 2013 at 14:33
  • \$\begingroup\$ Note that mipmaps increase the memory usage only by 33%. \$\endgroup\$
    – msell
    May 7, 2013 at 15:22
  • \$\begingroup\$ Picture please. Also, how are you using the textures? Will any of them be used at loss of detail zoom out level? \$\endgroup\$ May 7, 2013 at 16:10
  • \$\begingroup\$ @DevilWithin 33% more is quite a bit in my case. On a MacBook Pro Retina, I'm already at 1 GB of resident memory use for the huge artwork. Also, speculatively generating smaller images seems wasteful, I know exactly how big my texture is going to be on screen at load time. \$\endgroup\$
    – futlib
    May 8, 2013 at 9:05
  • 1
    \$\begingroup\$ futlib, artwork is not supposed to be at the local RAM memory! Unless you need to manipulate exceptional cases at runtime, you shouldn't have any images in the RAM. You load them, you upload to the GPU as a texture and unload the pixel data. Even if you only have 256MB or RAM and 256MB of video ram, I am sure you can fit everything into it. Most AAA games deal with that in huge worlds, I am sure you could too ;) \$\endgroup\$
    – Grimshaw
    May 8, 2013 at 12:35

2 Answers 2


Techniques like filtering and mipmaps will be useful when you have projections different from Orthogonal (specially anisotropic filters), or you don't previously know the resulting size of your textures on screen. And this, as you mention it, is not your case.

I think the best answer for your problem is first to ensure the 1:1 aspect ratio between your source art and the presentation of it, and exploring the use of Multisampling, where it will sample a pixel multiple times with slightly variations and then combine them.


Resample the image as soon as you know the target size.

You can use the GPU to resample with hardware acceleration:

  1. Load your big texture and enable/create mipmaps.
  2. Create your real texture at the perfect size.
  3. Use an FBO to draw the big texture as a quad into the small texture.
  4. Delete the big texture from memory.

Or you can use the CPU if you aren't satisfied with how mipmaps look, but going further than that in image quality would be a much longer answer, and probably more suited to another stack network site as it's more of general programming algorithm question. With that said, SDL_rotozoom can give you the basic idea of how it can work at the lowest level.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .