Platform SDK: DirectX |
A bump map is a DirectDraw surface object that uses a specialized pixel format. Rather than storing red, green, and blue color components, each pixel in a bump map stores the delta values for u and v (Du and Dv) and sometimes a luminance component, L. These values are applied by the system as described in the Bump Mapping Formulas topic.
Like any other surface, you specify a bump map pixel format by using a DDPIXELFORMAT structure. The DDPF_BUMPDUDV flag in the dwFlags member of the structure identifies a pixel format for a bump map texture. When the flag is present, the dwBumpBitCount, dwBumpDuBitMask, dwBumpDvBitMask, and dwBumpLuminanceBitMask members can be used to describe the bit depth for the bump map, and the mask values for each pixel component.
The Du and Dv components of a pixel are signed values that range from –1.0 to +1.0. The luminance component, when used, is an unsigned integer value that ranges from 0 to 255.
Note You should enumerate supported bump map pixel formats by calling the IDirect3DDevice7::EnumTextureFormats method. For more information, see Detecting Support for Bump Mapping.
Like any other surface, you specify a bump map pixel format by using a DDPIXELFORMAT type. The DDPF_BUMPDUDV flag in the lFlags member of the type identifies a pixel format for a bump map texture. When the flag is present, the lBumpBitCount, lBumpDuBitMask, lBumpDvBitMask, and lBumpLuminanceBitMask members can be used to describe the bit depth for the bump map, and the mask values for each pixel component.
The Du and Dv components of a pixel are signed values that range from –1.0 to +1.0. The luminance component, when used, is an unsigned integer value that ranges from 0 to 255.
Note You should enumerate supported bump map pixel formats to ensure that the pixel format you intend to use is valid. Call the Direct3DDevice7.GetTextureFormatsEnum method to retrieve a reference to a Direct3DEnumPixelFormats enumerator class for texture formats. Use the enumerator to retrieve information about the supported texture formats, including bump map formats. For more information, see Detecting Support for Bump Mapping.