Archived

This topic is now archived and is closed to further replies.

Linear, Tri-Linear and Bi-Linear filtering..

This topic is 5174 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Am just wonding how you select either Tri or Bi linear filtering for textures of does it all boil down to which parameters you give glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, x is there a list of what filter settings to give depending on the type of filtering you want ?? cheers Chris Jumpman - Under Construction

Share this post


Link to post
Share on other sites
The man page for TexParameteri (and maybe the GL spec itself) contains all the possible texture filters.

For now, bilinear is LINER_MIPMAP_NEAREST while trilinear is LINEAR_MIPMAP_LINEAR. Sometimes you cannot use mipmaps so bilinear can be used but without mipmaps (LINEAR). I heard this is sometimes called "linear" filtering but I can''t tell if this is correct - maybe it''s even more correct than "bilinear" however this is how things are going on.

Share this post


Link to post
Share on other sites
Hi,

I''ve done a program, based on this document :

http://developer.nvidia.com/object/Anisotropic_Filtering_OpenGL.html

In a few words, Anisotropic texture filtering produces higher image quality for most uses of texturing, and it is very easy to use! But you need to use this extension : GL_EXT_texture_filter_anisotropic


Here''s a screenshot :



========================
Leyder Dylan (dylan.leyder@slug-production.be.tf
http://www.slug-production.be.tf/

Share this post


Link to post
Share on other sites
Thats a completely useless screenshot to show anisotropic filtering. Anisotropic filter comes into play when you have very oblique surfaces to the viewpoint.

You have to remember that you''re unique, just like everybody else.

Share this post


Link to post
Share on other sites
Yes and for the Mipmapping, you can use also an extension, so hardware maipmapping :

GL_SGIS_generate_mipmap

========================
Leyder Dylan (dylan.leyder@slug-production.be.tf
http://users.skynet.be/fa550206/Slug-Production/Index.htm/

Share this post


Link to post
Share on other sites
Ok, to clarify on terms:

Bilinear filtering: Uses 4 texels to create the final colour ( linearly blends between the 4 to create the colour ).

Trilinear filtering: Uses 8 texels to create the final colour ( linearly blends between two sets of 4 texels from two mip levels, so it "blends" the mipmaps together to get rid of the sudden change between mipmap levels that you''d get otherwise ).

You can use mipmapping with bilinear filtering.

You have to remember that you''re unique, just like everybody else.

Share this post


Link to post
Share on other sites
My personal experience is that there are two kinds of bilinear filtering.

Linear interpolation w/o mipmapping. This is LINEAR. Mipmaps are not used.
Linear interpolation with mipmaps. This is LINEAR_MIPMAP_NEAREST (the default). Image quality is a bit better than LINEAR and speed is very similar. The difference between this and LINEAR is probably implementation-dependant so take this with some salt. The mipmaps are used as low-pass filters and they are **not** blended togheter.
Trilinear aka linear interpolation of linearly interpolated mipmaps. This is LINEAR_MIPMAP_LINEAR. Usually noticeable improvement over LINEAR_MIPMAP_NEAREST but it depends from a variety of factors. What others said about this is right, I wanted to say something other about the first twos.

As another thing, it should be pointed out that anisotropic filtering is not really a filtering mode but a parameter. You can effectively have anisotropic bilinear, anisotropic trilinear and so go on, so I don't actually understand why it has been pointed out. Anisotropic filtering can often improve quality **a lot** (as said, "Anisotropic filter comes into play when you have very oblique surfaces to the viewpoint").

EDIT: typo typo typo!!! Ack!

[edited by - Krohm on October 17, 2003 12:00:31 PM]

Share this post


Link to post
Share on other sites