DDS

From DmWiki

DDS (Microsoft DirectDraw Surface) is a image file format introduced in DirectX 7.0 used to store 2D, 3D and cubic environment maps. It supports mipmaps and compression.

There are five different types of compression available: DXT1, DXT2, DXT3, DXT4, and DXT5. Each one has a different way to encode the alpha channel:

  • DXT1: 0 or 1 bit alpha
  • DXT2: Explicit 4-bit alpha, color data premultiplied by alpha
  • DXT3: Explicit 4-bit alpha, color data not premultiplied
  • DXT4: Interpolated alpha, color data premultiplied by alpha
  • DXT5: Interpolated alpha, color data not premultiplied

Graphic cards that support DXTn format can decompress it on-the-fly leading to a faster rendering since memory bandwith used for the uploading textures is greatly reduced. Using DDS, loading times can improve too since the format can store in the same file the mipmaps.

D3DX has an useful function to read DDS (and many other image formats): see D3DXLoadSurfaceFromFile (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/graphics/reference/d3dx/functions/texture/d3dxloadsurfacefromfile.asp).

Links

see Texture Tools (http://developer.nvidia.com/object/nv_texture_tools.html) Developed by nVidia

This article is a stub. You can help improve the article by expanding it.

DevMaster navigation