Mipmaps can be pre-generated and included in the DDS files. In situations where many files are being constantly swapped in/out of the graphics unit, this can be a substantial savings and can reduce "lag", especially with big texture files. DDS files are ready to be used by the graphics system and can be read straight into graphics memory with little overhead. What are the advantages of DDS files and DXT compression? Note that the actual image size will likely be larger, as it will frequently include mipmap data. For an image using DXT3 or DXT5 incorporating an alpha channel, the requirements will be 8 bpp. So, for an image with no alpha using DXT1, compression results in an image using 4 bpp (bits per pixel). This allows the alpha channel to be represented more accurately than DXT5, but with less subtle transitions. Each pixel gets 4 bits to represent its alpha, for a total of 16 unique values of transparency. DXT3 handles the alpha channel a little differently. The alpha values are represented by 8 bits each, and the range indices by 3 bits each, allowing for gradients of up to 8 shades. Two alpha values are selected and used as the extremes for a range of transparency values. DXT5 stores alpha information in a way that is almost the same as color information. In DXT5, the alpha channel is encoded using a second set of 64 bits for each texel. How DXT handles this depends on the codec used.So for any set of images having the same dimensions, compressed size will always be the same. So each texel requires 2×16 bits for the colors, plus 16×2 bits for the indices, giving a total of 64 bits for each texel, which equates to 4 bits per pixel. The two representative colors are stored as 16-bit RGB values (5:6:5). The sixteen pixels of the texel are then assigned a 2-bit index (0-3) that maps them to the color range. For every texel, DXT selects two colors from the texel, each determining one end of a color range of 4 colors. DXT sees images as collections of 4×4 blocks of pixels called "texels".DDS files are very common in the game industry, where advantages in loading speed and video memory savings outweigh disadvantages. Together, a DDS file containing data organized using a DXT code creates an image file that can be used in most graphical applications, at least those that support DDS natively or via a plug-in. It was developed by Microsoft and introduced with DirectX 7. DDS (Direct Draw Surface) is an image file format, rather like a container for storing image data compressed using one of the DXT codecs. There are many different codecs: DXT1, DXT3, DXT5, etc. The original codecs were created by S3 Graphics, but many non-encumbered alternatives exist now. They all convert 4×4 blocks of pixels to either 64-bits or 128-bits depending on the codec. The set is also known as S3 Texture Compression (S3TC).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |