gDPSetTexturePersp [Macro]

Function

gDPSetTexturePersp

Enables/disables texture map perspective correction

Syntax

#include <ultra64.h>        /* gbi.h */
gDPSetTexturePersp(Gfx *gdl, u32 enable)
gsDPSetTexturePersp(         u32 enable)

Arguments

gdl
Display list pointer
enable
Prespective correction flag:
G_TP_NONE (Disable perspective correction)
G_TP_PERSP (Enable perspective correction)

Description

Enables/disables perspective correction in texture sampling mode. When perspective correction is turned on, texture coordinates are corrected at every pixel by the RDP. For details, see Section 12.4.6 "Texture Sampling Mode" in the N64 Programming Manual.

Note

Perspective correction must be enabled when you are rendering textured triangles, regardless of whether you are using perspective projection or orthogonal projection. This is because perspective correction improves the precision of the texture coordinates. On the other hand, you should always disable perspective correction when drawing textured rectangles (hardware sprites).

See Also

gDPSetPrimColor, gDPSetTextureDetail, gDPSetTextureLOD, and gDPSetTextureLUT

Revision History

02/01/99   Completely rewritten