DirectX SDK

About the Clamp Texture Address Mode

[C++]

The "clamp" texture address mode, identified by the D3DTADDRESS_CLAMP member of the D3DTEXTUREADDRESS enumerated type, causes Direct3D to clamp your texture coordinates to the [0.0, 1.0] range. That is, it will apply the texture once, then "smear" the color of edge pixels. For instance, suppose that your program creates a square primitive and assigns texture coordinates of (0.0,0.0), (0.0,3.0), (3.0,3.0), and (3.0,0.0) to the primitive's vertices. Setting the texture addressing mode to D3DTADDRESS_CLAMP will result in the texture being applied once. The pixel colors at the top of the columns and the end of the rows are extended to the top and right of the primitive respectively.

[Visual Basic]

The "clamp" texture address mode, identified by the D3DTADDRESS_CLAMP member of the CONST_D3DTEXTUREADDRESS enumeration, causes Direct3D to clamp your texture coordinates to the [0.0, 1.0] range. That is, it will apply the texture once, then "smear" the color of edge pixels. For instance, suppose that your program creates a square primitive and assigns texture coordinates of (0.0,0.0), (0.0,3.0), (3.0,3.0), and (3.0,0.0) to the primitive's vertices. Setting the texture addressing mode to D3DTADDRESS_CLAMP will result in the texture being applied once. The pixel colors at the top of the columns and the end of the rows are extended to the top and right of the primitive respectively.

This is illustrated in the following figure: