次の方法で共有


Anisotropic Texture Filtering (Windows Embedded CE 6.0)

1/6/2010

Anisotropy is the distortion visible in the texels of a 3-D object whose surface is oriented at an angle with respect to the plane of the screen. When a pixel from an anisotropic primitive is mapped to texels, its shape is distorted. Microsoft® Direct3D Mobile® measures the anisotropy of a pixel as the elongation — that is, length divided by width — of a screen pixel that is inverse-mapped into texture space.

You can use anisotropic texture filtering in conjunction with linear texture filtering or mipmap texture filtering to improve rendering results. Your application enables anisotropic texture filtering by calling the IDirect3DMobileDevice::SetTextureStageState method. Set the value of the first parameter to the integer index number (0-7) of the texture for which you are selecting a texture filtering method. Pass one of the D3DMTEXTURESTAGESTATETYPE enumeration values D3DMTSS_MAGFILTER, D3DMTSS_MINFILTER, or D3DMTSS_MIPFILTER for the second parameter to set the magnification, minification, or mipmapping filter. Set the third parameter to D3DMTEXF_ANISOTROPIC.

Your application must also set the degree of anisotropy to a value greater than one. Do this by calling the IDirect3DMobileDevice::SetTextureStageState method. Set the value of the first parameter to the integer index number (0-7) of the texture for which you are setting the degree of isotropy. Pass D3DMTSS_MAXANISOTROPY as the value of the second parameter. The final parameter should be the degree of isotropy.

You can disable isotropic filtering by setting the degree of isotropy to one; any value larger than one enables it. Check the MaxAnisotropy flag in the D3DMCAPS structure to determine the possible range of values for the degree of anisotropy.

See Also

Concepts

Texture Filtering