gDPSetTextureFilter [Macro]

Function

gDPSetTextureFilter

Sets the filter type for texture tile sampling

Syntax

#include <ultra64.h>        /* gbi.h */
gDPSetTextureFilter(Gfx *gdl, u32 type)
gsDPSetTextureFilter(         u32 type)

Arguments

gdl
Display list pointer.
mode
Texture sampling mode:
G_TF_POINT (Point sampling mode).
G_TF_AVERAGE (Box filtering mode).
G_TF_BILERP (Bilinear filtering mode).

Description

Sets the type of filter to use when sampling a texture tile.

The different texture sampling modes are explained below:
G_TF_POINT
Selects the texel nearest the pixel on the screen.
G_TF_AVERAGE
Averages the 4 texels surrounding the pixel on the screen.
G_TF_BILERP
Performs bilinear interpolation on the 4 texels surrounding the pixel on the screen. Two bilinear interpolated tiles can be sent to the color combiner (CC) for linear interpolation in a MIP-map filtering process.

For details, see Sections 12.5.1 "Filter Types," 13.7.5.2 "Bilinear Filtering and Point Sampling," and 14.1 "Sampling Overview" in the N64 Programming Manual.

Note

For reasons of optimization, the texture filter does not execute strict bilinear interpolation. Rather, it performs linear interpolation on the three texels nearest the screen pixel.

Revision History

02/01/99   Completely rewritten