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

Started by
9 comments, last by Jumpman 20 years, 6 months ago
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
Advertisement
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.

Previously "Krohm"

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/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
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.
If at first you don't succeed, redefine success.
Sorry chief ...



========================
Leyder Dylan (dylan.leyder@slug-production.be.tf
http://users.skynet.be/fa550206/Slug-Production/Index.htm/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
Yeah, sorry, that was a bit of a harsh post...

You have to remember that you''re unique, just like everybody else.
If at first you don't succeed, redefine success.
according to some documentation I read, only Trilinear uses mipmaps.. Bilinear is only glTexImage2D.

is this true ??.. I though that mipmaps (aswell as used for filtering) also generated multiple textures for GL to use at different view depths..



Jumpman - Under Construction
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/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
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.
If at first you don't succeed, redefine success.
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]

Previously "Krohm"

This topic is closed to new replies.

Advertisement