View Full Version : Billiniar & Triliniar Filtering
I know what biliniar and triliniar filtering is, but how are these things exactly used with gl? I think it has something to do with mipmaps, but which combination of texture filters are used to create b. or t. filtering?
06-09-2002, 08:35 AM
You are looking in the right place. For linear interpolation of a parameter you'd say you have linear interpolation. For interpolating 2 parameters it might be called bilinear interpolation. For texture you have 2 axes, the s & t texture axes. So for a texture filter where you have s & t coordinates any you want to interpolate them you enable GL_LINEAR filtering and call this bilinear filtering. This can be applied to the magnification or minification filter. In each case four texture samples are used and an interpolation between them is performed on 2 axes. The earlied graphics API called IrisGL used to explicitly name these filters BILINEAR, OpenGL does not, the token is GL_LINEAR.
Now for trilinear filtering there are a couple of scenarios which would lead to trilinear filtering. One is to use 3D texture where you have s, t and r texture coordinates, with 8 texture samples being interpolated across 3 axes. Another trilinear filter is trilinear MIP map filtering. This is where there is bilinear texture interpolation for each texture level and the third trilinear axis interpolating the level of detail (resolution) of the texture. Again this would be 8 samples interpolated across 3 axes. This is only for texture minification and the token is GL_LINEAR_MIPMAP_LINEAR. It used to be called MIPMAP_TRILINEAR in IrisGL.
OpenGL allows the independent specification of filtering of level samples vs between levels. So, for example there is also GL_NEAREST_MIPMAP_NEAREST with no linear filtering, it's just an impulse filter, then there's GL_NEAREST_MIPMAP_LINEAR which is a bilinear filter where the level is not interpolated and only 4 samples are used from the image determined by the level of detail, and GL_LINEAR_MIPMAP_NEAREST which is a linear filter not a bilinear one where the LOD is interpolated between a single sample from 2 levels. Only LINEAR_MIPMAP_LINEAR is trilinear for 2D textures and is highest quality.
There is also quadlinear filtering for a MIP mapped 3D texture :-)
[This message has been edited by dorbie (edited 06-09-2002).]
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.