index.html 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>Texture Compression and Decompression &#8212; Compressonator Compressonator - latest build documentation</title>
  7. <link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
  8. <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
  9. <link rel="stylesheet" href="../../_static/theme_overrides.css" type="text/css" />
  10. <script type="text/javascript">
  11. var DOCUMENTATION_OPTIONS = {
  12. URL_ROOT: '../../',
  13. VERSION: 'Compressonator - latest build',
  14. COLLAPSE_INDEX: false,
  15. FILE_SUFFIX: '.html',
  16. HAS_SOURCE: true,
  17. SOURCELINK_SUFFIX: '.txt'
  18. };
  19. </script>
  20. <script type="text/javascript" src="../../_static/jquery.js"></script>
  21. <script type="text/javascript" src="../../_static/underscore.js"></script>
  22. <script type="text/javascript" src="../../_static/doctools.js"></script>
  23. <link rel="index" title="Index" href="../../genindex.html" />
  24. <link rel="search" title="Search" href="../../search.html" />
  25. <link rel="next" title="Mesh Optimization" href="../mesh_optimization/index.html" />
  26. <link rel="prev" title="Compressonator SDK" href="../cmp_compressonator/index.html" />
  27. <link rel="stylesheet" href="../../_static/custom.css" type="text/css" />
  28. <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
  29. </head>
  30. <body>
  31. <div class="document">
  32. <div class="documentwrapper">
  33. <div class="bodywrapper">
  34. <div class="body" role="main">
  35. <div class="section" id="texture-compression-and-decompression">
  36. <h1>Texture Compression and Decompression<a class="headerlink" href="#texture-compression-and-decompression" title="Permalink to this headline">¶</a></h1>
  37. <p>For more details see Bibliography Reference (1)</p>
  38. <div class="section" id="bc1-block-s3tc-dxt1">
  39. <h2>BC1 Block (S3TC/DXT1)<a class="headerlink" href="#bc1-block-s3tc-dxt1" title="Permalink to this headline">¶</a></h2>
  40. <p>BC1 block consists of two base colors c0 and c1 and an index table (bitmap).</p>
  41. <p>The index table, however, has a two-bit entry, since BC1 allows for 2 additional colors, c2 and c3 obtained by blending of the base colors.
  42. All together c0, c1, c2 and c3 could be treated as a local palette for a compressed block.
  43. The base colors are stored in RGB565 format, i.e. 5 bits for red and blue channels and 6 bit for green channel, resulting in 4bpp compression level.</p>
  44. <p>There are two types of BC1 blocks: the first one that does not support transparency and the second one, that does.</p>
  45. </div>
  46. <div class="section" id="bc2-block-dxt2-dxt3">
  47. <h2>BC2 Block (DXT2/DXT3)<a class="headerlink" href="#bc2-block-dxt2-dxt3" title="Permalink to this headline">¶</a></h2>
  48. <p>The BC1 format can manage 24-bit RGB textures, but is unsuitable for 32-bit RGBA8888 textures.
  49. The BC2 block occupies 128 bit, twice the BC1 size. Therefore, compression level is 8bpp.
  50. One half of the BC2 is reserved for alpha values with 4-bit precision, the other one is just a BC1 for storing RGB data</p>
  51. </div>
  52. <div class="section" id="bc3-block-dxt4-dxt5">
  53. <h2>BC3 Block (DXT4/DXT5)<a class="headerlink" href="#bc3-block-dxt4-dxt5" title="Permalink to this headline">¶</a></h2>
  54. <p>The BC3 block, likewise BC2, consists of two 64-bit parts: one for the alpha data and one for the color data.
  55. Color part repeats the BC1 layout as well, but the alpha part is stored in the compressed form.
  56. Alpha compression is very similar to the DXT1 except for the number of the channels; there are two endpoints with 8-bit precision and the table of 3-bit indexes allowing to choose one of the eight values of a local palette.</p>
  57. </div>
  58. <div class="section" id="bc4-block-ati1-3dc">
  59. <h2>BC4 Block (ATI1/3Dc+)<a class="headerlink" href="#bc4-block-ati1-3dc" title="Permalink to this headline">¶</a></h2>
  60. <p>The BC4 block (Figure 9) is just an alpha part of the BC3 block. It is used for 1-channel textures, for example a height map or a specular map. Decoded values are associated with the red channel.</p>
  61. </div>
  62. <div class="section" id="bc5-block-ati2-3dc">
  63. <h2>BC5 Block (ATI2/3Dc)<a class="headerlink" href="#bc5-block-ati2-3dc" title="Permalink to this headline">¶</a></h2>
  64. <p>The 3Dc format was originally developed by ATI specially for the normal map compression, as the DXT1 format did not provide the required quality for such data.
  65. Normal map contains information about the direction of normal vector for every texel, which allows one to compute lighting with high level of detail and without increasing the geometry complexity.</p>
  66. </div>
  67. <div class="section" id="bc6h">
  68. <h2>BC6H<a class="headerlink" href="#bc6h" title="Permalink to this headline">¶</a></h2>
  69. <p>The BC6H format is designed to compress textures with high dynamic range (HDR). Only RGB images without alpha are supported.
  70. The format uses 128-bit blocks, resulting in 8bpp compression level.
  71. Depending on the block type, a compressed block has a different set of fields and a different size of each field. This allows choosing the best encoding on the per block basis.
  72. This flexibility greatly reduces compression artifacts, but strongly complicates the compression procedure.
  73. The number of block types has increased to 14 for BC6H and to 8 for BC7. Unlike BC1, block type is set explicitly in the first bits of compressed block. Block type is also referred to as the block mode.</p>
  74. </div>
  75. <div class="section" id="bc7">
  76. <h2>BC7<a class="headerlink" href="#bc7" title="Permalink to this headline">¶</a></h2>
  77. <p>Improves quality be adding new formats that improve the endpoint precision and storing up to three pairs of endpoints.
  78. The format uses 128-bit blocks, resulting in 8bpp compression level.</p>
  79. <div class="toctree-wrapper compound" id="toc-developer-sdk-codecs">
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  87. <div class="sphinxsidebarwrapper">
  88. <p class="logo"><a href="../../index.html">
  89. <img class="logo" src="../../_static/acompress-128.png" alt="Logo"/>
  90. </a></p>
  91. <h1 class="logo"><a href="../../index.html">Compressonator</a></h1>
  92. <h3>Navigation</h3>
  93. <p class="caption"><span class="caption-text">Content</span></p>
  94. <ul class="current">
  95. <li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer SDK</a></li>
  96. <li class="toctree-l1"><a class="reference internal" href="../../command_line_tool/index.html">Command Line Tool</a></li>
  97. <li class="toctree-l1"><a class="reference internal" href="../../gui_tool/index.html">GUI Tool</a></li>
  98. <li class="toctree-l1"><a class="reference internal" href="../../build_from_source/build_instructions.html">Build from GitHub Sources</a></li>
  99. <li class="toctree-l1"><a class="reference internal" href="../../analysis/index.html">Analysis</a></li>
  100. <li class="toctree-l1"><a class="reference internal" href="../../revisions.html">Revision History</a></li>
  101. <li class="toctree-l1"><a class="reference internal" href="../../support/contact.html">Contact and Support</a></li>
  102. <li class="toctree-l1"><a class="reference internal" href="../../support/license.html">License</a></li>
  103. <li class="toctree-l1"><a class="reference internal" href="../../bibliography.html">Bibliography</a></li>
  104. </ul>
  105. <div class="relations">
  106. <h3>Related Topics</h3>
  107. <ul>
  108. <li><a href="../../index.html">Documentation overview</a><ul>
  109. <li><a href="../index.html">Developer SDK</a><ul>
  110. <li>Previous: <a href="../cmp_compressonator/index.html" title="previous chapter">Compressonator SDK</a></li>
  111. <li>Next: <a href="../mesh_optimization/index.html" title="next chapter">Mesh Optimization</a></li>
  112. </ul></li>
  113. </ul></li>
  114. </ul>
  115. </div>
  116. <div id="searchbox" style="display: none" role="search">
  117. <h3>Quick search</h3>
  118. <form class="search" action="../../search.html" method="get">
  119. <div><input type="text" name="q" /></div>
  120. <div><input type="submit" value="Go" /></div>
  121. <input type="hidden" name="check_keywords" value="yes" />
  122. <input type="hidden" name="area" value="default" />
  123. </form>
  124. </div>
  125. <script type="text/javascript">$('#searchbox').show(0);</script>
  126. </div>
  127. </div>
  128. <div class="clearer"></div>
  129. </div>
  130. <div class="footer">
  131. &copy;2017 to 2021, AMD Developer Tools.
  132. |
  133. Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.5</a>
  134. &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
  135. </div>
  136. </body>
  137. </html>