Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.kge.msu.ru/workgroups/compcenter/dmitri/projects/polyworld/texturefiltering/index.htm
Дата изменения: Mon Mar 15 21:01:47 2004
Дата индексирования: Mon Oct 1 21:28:56 2012
Кодировка:
PolyWorld Texture Filtering

PolyWorld Texture Filtering

This page briefly describes the texture filtering modes implemented in the current release of PolyWorld Engine.

 

MIP Levels Distribution

The following is a sample MIP-map texture generated from a regular 256x256 texture map.
Seven MIP levels are generated for each of the texture coordinates (u, v).
This map is usually referred to as a 4D Pyramid Anisotropic Filtering map.

 

Bilinear Texture Filtering

Only one, isotropic integer MIP level is calculated (MIPu = MIPv).

Four texels, with coordinates (iu, iv), (iu+1, iv), (iu, iv+1) and (iu+1, iv+1) are sampled from the texture.

The fractional parts of texture coordinates (fu, fv) are used to calculate the resulting pixel color as follows:
tmp1 = lrp(T(iu, iv), T(iu+1, iv), fu);
tmp2 = lrp(T(iu, iv+1), T(iu+1, iv+1), fu);
color = lrp(tmp1, tmp2, fv);

 

Trilinear Texture Filtering

Unlike the Bilinear Filtering case shown above, rational isotropic MIP level is calculated
(MIP_u = MIP_v).

Two bilinear lookups are performed for two MIP levels, the integer part of the main MIP
(int_MIP) and its successor (int_MIP+1), to give interpolated colors color1 and color2.

The fractional part of a MIP level is used to calculate the resulting pixel color as follows:
color = lrp(color1, color2, frc_MIP);

 

Bilinear Anisotropic Texture Filtering

The only difference from Bilinear Filtering is that the MIP levels for both texture
coordinates are calculated independently, that is, MIP_u != MIP_v.

Obviously, if (MIP_u == MIP_v), we have a regular Bilinear Filtering case.

 

Trilinear Anisotropic Texture Filtering

Rational anisotropic MIP levels are calculated (MIP_u != MIP_v).

Four bilinear lookups are performed for four MIP levels:
(int_MIP_u, int_MIP_v), (int_MIP_u+1, int_MIP_v), (int_MIP_u, int_MIP_v+1),
(int_MIP_u+1, int_MIP_v+1), to give four intermediate colors,
color1, color2, color3 and color4.

The fractional parts of MIP_u and MIP_v are used to calculate the resulting
pixel color in a bilinear fashion:
tmp1 = lrp(color1, color2, frc_MIP_u);
tmp2 = lrp(color3, color4, frc_MIP_u);
color = lrp(tmp1, tmp2, frc_MIP_v);

This resembles the plain Bilinear Filtering case shown above, except that
the interpolation is made on four bilinearly interpolated temporary colors,
not the texels.

 

Normal-mapping Quality comparison

Bilinear Isotropic
Trilinear Isotropic
Bilinear Anisotropic
Trilinear Anisotropic

 

Texturing Quality comparison

Bilinear Isotropic
Trilinear Isotropic
Bilinear Anisotropic
Trilinear Anisotropic