N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential

## gDPSetTextureFilter [macro]

Sets the filter type for texture tile sampling.

Syntax

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

Arguments

- gdl is the display list pointer.

- mode is the texture sampling mode:
  G_TF_POINT (Point sampling mode).
  G_TF_AVERAGE (Box filtering mode).
  G_TF_BILERP (Bilinear filtering mode).

Explanation
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 Section 12.5.1, "Filter Types," Section 13.7.5.3, "Bilinear Filtering and Point Sampling," and Section 14.1, "Sampling Overview," in the N64 Online Programming Manual.

Notes
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
2/1/99 Completely rewritten.

Nintendo® Confidential Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.
Copyright © 1998-1999
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last Updated April, 1999