how to remove texture aliasing .. ? Anti-aliasing techniques required..

Started by
10 comments, last by Nik02 12 years, 6 months ago
I studied some material and came to know that in this way I can get the highest quality texture. Am i right?

glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); //GL_LINEAR_MIPMAP_LINEAR
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP );
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP );
glTexParameterf(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
+
glEnable(GL_MULTISAMPLE_ARB);


If the quality/smoothness can be further improved/enhanced then comments will be appreciated. Thanks.
Advertisement
If you want more fidelity than the standard texture filters can provide, you could look into writing a fragment shader that performs higher-order filtering (such as cubic). This will affect the texturing performance, though, because such a shader would need to take multiple filtered samples from the texture to produce one output. That said, the shader is not incredibly complex either so modern hardware can cope with it just fine.

The book "GPU Gems 2" (Nvidia) has further information on this.

Niko Suni

This topic is closed to new replies.

Advertisement