Table of Contents Glide Programming Guide



Download 6.22 Mb.
Page63/106
Date03.02.2023
Size6.22 Mb.
#60547
1   ...   59   60   61   62   63   64   65   66   ...   106
GLIDEPGM

10Trilinear Filtering


The combination of bilinear filtering, mipmapping, and mipmap blending is generally known as trilinear mipmapping. Trilinear mipmapping provides maximum visual quality by performing inter- and intra-mipmap blending. However, trilinear mipmapping is a two-pass operation on Voodoo Graphics subsystems with a single TMU. Nearest dithered mipmapping results in nearly the same visual quality as trilinear texture mapping, however, it is always a single pass operation and thus achieves consistent performance across a wider range of hardware.

11LOD Bias


Glide allows an application to control an arbitrary factor known as LOD bias; it affects the point at which mipmapping levels change. Increasing values for LOD bias makes the overall images blurrier or smoother. Decreasing values make the overall images sharper. Selection of LOD bias is a qualitative judgment that is application and texture dependent. LOD bias can be any value in the range [–8.0..7.75]. However, the hardware will snap LOD bias to the nearest quarter. There is no “best” setting for the LOD bias; it is a very subjective control. Some textures look better if sharper than “normal,” while others look better blurred.
The LOD bias is controlled with the function grTexLodBiasValue(). The first argument, tmu, identifies the TMU to modify; valid values are GR_TMU0, GR_TMU1, and GR_TMU2. The second argument, bias, is a signed floating point value in the range [–8..7.75].
void grTexLodBiasValue( GrChipID_t tmu, float bias )

grTexLodBiasValue() changes the current LOD bias value, which allows an application to maintain fine grain control over the effects of mipmapping, specifically when mipmap levels change. The LOD bias value is added to the LOD calculated for a pixel and the result determines which mipmap level to use. An LOD of n is calculated when a pixel covers approximately 22n texels. For example, when a pixel covers approximately one texel, the LOD is 0; when a pixel covers four texels, the LOD is 1; when a pixel covers 16 texels, the LOD is 2. Smaller LOD values make increasingly sharper images that may suffer from aliasing and moiré effects. Larger LOD values make increasingly smooth images that may suffer from becoming too blurry. The default LOD bias value is 0.0.
During some special effects, an LOD bias may help image quality. If an application is not performing texture mapping with trilinear filtering or dithered mipmapping, then an LOD bias of +.5 generally improves image quality by rounding to the nearest LOD. If an application is performing dithered mipmapping (i.e. grTexMipMapMode() is GR_MIPMAP_NEAREST_DITHER), then an LOD bias of 0.0 or +.25 generally improves image quality. An LOD bias value of 0.0 is usually best with trilinear filtering.

Download 6.22 Mb.

Share with your friends:
1   ...   59   60   61   62   63   64   65   66   ...   106




The database is protected by copyright ©ininet.org 2024
send message

    Main page