In my Minecraft-clone style game, blocks are textured with a border that is lighter then the block color. See picture below:
To achieve this effect without the textures being blurry I use this code:
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
Without setting the MAG_FILTER to GL_NEAREST, it looks like this:
This is ugly and blurry. The upper picture (with GL_NEAREST enabled) is obviously superior. My issue is that the edges in the upper picture are aliased (it is more obvious if you view the photo full-size.)
Is there any way to anti-alias textures? It does not look very good if the borders are aliased like this. Alternatively, is there any way to get rid of the aliasing on the borders?
Thank you for any help!