Applications can apply perspective correction to textures to make them fit properly onto primitives that diminish in size as they get farther away from the viewer. See D3DRENDERSTATE_TEXTUREPERSPECTIVE.
The following code fragment illustrates the process of enabling texture perspective correction:
// This code fragment assumes that lpD3DDevice3 is a valid pointer to
// a Direct3DDevice3.
// Enable texture perspective.
lpD3DDevice3->SetRenderState(D3DRENDERSTATE_TEXTUREPERSPECTIVE,
TRUE);
For the IDirect3DDevice3 interface, the default value is TRUE to enable perspective correct texture mapping. For earlier interfaces, the default is FALSE. Note that many 3-D adapters apply texture perspective correction unconditionally. Perspective correction must be enabled to use w-based fog, and w-buffers. For more information, see Eye-relative vs. Z-Based Depth in the Fog section, and Enabling Depth Buffering in the Depth Buffers section.