ReadMe.txt 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. DIRECTX TEXTURE LIBRARY (DirectXTex)
  2. ------------------------------------
  3. Copyright (c) Microsoft Corporation. All rights reserved.
  4. April 7, 2017
  5. This package contains DirectXTex, a shared source library for reading and writing DDS
  6. files, and performing various texture content processing operations including
  7. resizing, format conversion, mip-map generation, block compression for Direct3D runtime
  8. texture resources, and height-map to normal-map conversion. This library makes
  9. use of the Windows Image Component (WIC) APIs. It also includes simple .TGA and .HDR
  10. readers and writers since these image file formats are commonly used for texture content
  11. processing pipelines, but are not currently supported by a built-in WIC codec.
  12. The source is written for Visual Studio 2013 or 2015. It is recommended that you
  13. make use of VS 2013 Update 5 or VS 2015 Update 3 and Windows 7 Service Pack 1 or later.
  14. DirectXTex\
  15. This contains the DirectXTex library. This includes a full-featured DDS reader and writer
  16. including legacy format conversions, a TGA reader and writer, a HDR reader and writer,
  17. a WIC-based bitmap reader and writer (BMP, JPEG, PNG, TIFF, and HD Photo), and various
  18. texture processing functions. This is intended primarily for tool usage.
  19. Note that the majority of the header files here are intended for internal implementation
  20. of the library only (BC.h, BCDirectCompute.h, DDS.h, DirectXTexP.h, filters.h, and scoped.h).
  21. Only DirectXTex.h is meant as a 'public' header for the library.
  22. Texconv\
  23. This DirectXTex sample is an implementation of the "texconv" command-line texture utility
  24. from the DirectX SDK utilizing DirectXTex rather than D3DX.
  25. It supports the same arguments as the Texture Conversion Tool Extended (texconvex.exe) DirectX
  26. SDK utility. See <http://msdn.microsoft.com/en-us/library/ee422506.aspx>. The primary differences
  27. are the -10 and -11 arguments are not applicable and the filter names (POINT, LINEAR, CUBIC,
  28. FANT or BOX, TRIANGLE, *_DITHER, *_DITHER_DIFFUSION). This also includes support for the JPEG XR
  29. (HD Photo) bitmap format.
  30. (see <http://blogs.msdn.com/b/chuckw/archive/2011/01/19/known-issue-texconvex.aspx>)
  31. Texassemble\
  32. This DirectXTex sample is a command-line utility for creating cubemaps, volume maps, or
  33. texture arrays from a set of individual input image files.
  34. DDSView\
  35. This DirectXTex sample is a simple Direct3D 11-based viewer for DDS files. For array textures
  36. or volume maps, the "<" and ">" keyboard keys will show different images contained in the DDS.
  37. The "1" through "0" keys can also be used to jump to a specific image index.
  38. DDSTextureLoader\
  39. This contains a streamlined version of the DirectX SDK sample DDSWithoutD3DX11 texture
  40. loading code for a simple light-weight runtime DDS loader. This version only supports
  41. Direct3D 11 or Direct3D 12 and performs no runtime pixel data conversions (i.e. 24bpp
  42. legacy DDS files always fail). This is ideal for runtime usage, and supports the full
  43. complement of Direct3D texture resources (1D, 2D, volume maps, cubemaps, mipmap levels,
  44. texture arrays, BC formats, etc.).
  45. ScreenGrab\
  46. This contains screen grab modules for Direct3D 11 and Direct3D 12 primarily intended
  47. for creating screenshots. The images are written as a DDS or as an image file format
  48. using WIC.
  49. WICTextureLoader\
  50. This contains a Direct3D 11 and Direct3D 12 2D texture loader that uses WIC to load a
  51. bitmap (BMP, JPEG, PNG, HD Photo, or other WIC supported file container), resize if needed
  52. based on the current feature level (or by explicit parameter), format convert to a
  53. DXGI_FORMAT if required, and then create a 2D texture. Note this does not support 1D textures,
  54. volume textures, cubemaps, or texture arrays. DDSTextureLoader is recommended for fully
  55. "precooked" textures for maximum performance and image quality, but this loader can be useful
  56. for creating simple 2D texture from standard image files at runtime.
  57. NOTE: DDSTextureLoader, ScreenGrab, and WICTextureLoader are 'stand-alone' versions of the same
  58. modules provided in the DirectX Tool Kit.
  59. All content and source code for this package are subject to the terms of the MIT License.
  60. <http://opensource.org/licenses/MIT>.
  61. Documentation is available at <https://github.com/Microsoft/DirectXTex/wiki>.
  62. For the latest version of DirectXTex, bug reports, etc. please visit the project site.
  63. http://go.microsoft.com/fwlink/?LinkId=248926
  64. This project has adopted the Microsoft Open Source Code of Conduct. For more information see the
  65. Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
  66. https://opensource.microsoft.com/codeofconduct/
  67. ------------------------------------
  68. RELEASE NOTES
  69. * The alpha mode specification for DDS files was updated between the March 2013 and April 2013 releases. Any
  70. DDS files created using the DDS_FLAGS_FORCE_DX10_EXT_MISC2 flag or the texconv -dx10 switch using the
  71. March 2013 release should be refreshed.
  72. * Due to the underlying Windows BMP WIC codec, alpha channels are not supported for 16bpp or 32bpp BMP pixel format
  73. files. The Windows 8.x and Windows 10 version of the Windows BMP WIC codec does support 32bpp pixel formats with
  74. alpha when using the BITMAPV5HEADER file header. Note the updated WIC is available on Windows 7 SP1 with KB 2670838
  75. installed.
  76. * While DXGI 1.0 and DXGI 1.1 include 5:6:5 (DXGI_FORMAT_B5G6R5_UNORM) and 5:5:5:1 (DXGI_FORMAT_B5G5R5A1_UNORM)
  77. pixel format enumerations, the DirectX 10.x and 11.0 Runtimes do not support these formats for use with Direct3D.
  78. The DirectX 11.1 runtime, DXGI 1.2, and the WDDM 1.2 driver model fully support 16bpp formats (5:6:5, 5:5:5:1, and
  79. 4:4:4:4).
  80. * WICTextureLoader cannot load .TGA or .HDR files unless the system has a 3rd party WIC codec installed. You
  81. must use the DirectXTex library for TGA/HDR file format support without relying on an add-on WIC codec.
  82. * Loading of 96bpp floating-point TIFF files results in a corrupted image prior to Windows 8. This fix is available
  83. on Windows 7 SP1 with KB 2670838 installed.
  84. ------------------------------------
  85. RELEASE HISTORY
  86. April 7, 2017
  87. VS 2017 updated for Windows Creators Update SDK (15063)
  88. texassemble: -tonemap switch
  89. texconv: -wicmulti switch
  90. January 31, 2017
  91. DirectX 12 versions of IsSupported, CreateTexture (PrepareUpload), and CaptureTexture
  92. Update to DirectX 11 version of IsSupported
  93. WIC format 40bppCMYKAlpha should be converted to RGBA8 rather than RGBA16
  94. DDS support for L8A8 with bitcount 8 rather than 16
  95. DXGI_FORMAT_R32G8X24_TYPELESS and DXGI_FORMAT_R24G8_TYPELESS should be IsDepthStencil formats
  96. Updates to DDSTextureLoader, ScreenGrab, and WICTextureLoader
  97. Minor code cleanup
  98. December 5, 2016
  99. Fixed over-validation in DDS header parsing
  100. VS 2017 RC projects added
  101. Minor code cleanup
  102. October 5, 2016
  103. *breaking change*
  104. Renamed Evaluate to EvaluateImage, Transform to TransformImage
  105. texdiag: new command-line tool for texture debugging
  106. texconv: -bcmax, -bcquick, -tonemap, and -x2bias switches
  107. texconv: overwrite writing and -y switch
  108. texconv/texassemble: optional OpenEXR support
  109. texassemble: command syntax with support for generating strip and cross images from cubemap
  110. Updates to DDSTextureLoader, WICTextureLoader, and ScreenGrab
  111. Minor code cleanup
  112. September 14, 2016
  113. HDR (RGBE Radiance) file format reader and writer
  114. Evaluate and Transform functions for computing user-defined functions on images
  115. Fix BC6H GPU shaders on WARP device
  116. Fix for alignment issues on ARM devices in software compression codec
  117. Added TEX_THRESHOLD_DEFAULT (0.5f) constant default alpha threshold value for Convert & Compress
  118. Minor CaptureTexture optimization
  119. texconv/texassemble: Support for .hdr file format
  120. texconv: added -gpu switch to specify adapter to use for GPU-based compression codecs
  121. texconv: added -badtails switch to enable loading of legacy DXTn DDS files with incomplete mipchain tails
  122. texconv: added -c switch for old-school colorkey/chromakey transparency to alpha conversion
  123. texconv: added -alpha switch for reverse premultiply along with TEX_PMALPHA_REVERSE flag
  124. texconv: added wildcard support for input filename and optional -r switch for recursive search
  125. August 4, 2016
  126. CompileShader script updated to build external pdbs
  127. Regenerated shaders using Windows 10 Anniversary Update SDK (14393)
  128. August 2, 2016
  129. Updated for VS 2015 Update 3 and Windows 10 SDK (14393)
  130. August 1, 2016
  131. Workaround for bug in XMStoreFloat3SE (impacts conversions to DXGI_FORMAT_R9G9B9E5_SHAREDEXP)
  132. DDSTextureLoader12, WICTextureLoader12, and ScreenGrab12 for Direct3D 12 support
  133. Minor code cleanup
  134. June 27, 2016
  135. texconv command-line tool -wicq and -wiclossless switches
  136. Code cleanup
  137. April 26, 2016
  138. Optional callback from WIC reader functions to query additional metadata
  139. Retired obsolete adapter code
  140. Minor code cleanup
  141. February 23, 2016
  142. Fix to clean up partial or zero-length image files on failed write
  143. Retired VS 2012 projects
  144. November 30, 2015
  145. texconv command-line tool -fl switch now supports 12.0 and 12.1 feature levels
  146. Updated for VS 2015 Update 1 and Windows 10 SDK (10586)
  147. October 30, 2015
  148. DDS support for legacy bumpmap formats (V8U8, Q8W8V8U8, V16U16)
  149. Fix for buffer overread in BC CPU compressor
  150. Minor code cleanup
  151. August 18, 2015
  152. Added GetWICFactory and SetWICFactory
  153. Updates for new DXGI 1.3 types
  154. Xbox One platform updates
  155. July 29, 2015
  156. Fixed rounding problem with 32-bit RGBA/BGRA format conversions
  157. texconv: use CPU parallel compression for BC1-BC5 (-singleproc disables)
  158. Updated for VS 2015 and Windows 10 SDK RTM
  159. Retired VS 2010 and Windows 8.0 Store projects
  160. June 18, 2015
  161. New BC_FLAGS_USE_3SUBSETS option for BC7 compressors; now defaults to skipping 3 subset blocks
  162. Fixed bug with MakeTypeless and A8_UNORM
  163. Fixed file length validation problem in LoadDDSFromFile
  164. March 27, 2015
  165. Added projects for Windows apps Technical Preview
  166. Fixed bug with WIC-based mipmap generation for non-WIC supported formats
  167. Fixed bug with WIC multiframe loader when resizing required
  168. texconv: Added -nmap/-nmapamp for generating normal maps from height maps
  169. texconv/texassemble: Updated to load multiframe WIC files (tiff, gif)
  170. Minor code cleanup
  171. November 24, 2014
  172. Updates for Visual Studio 2015 Technical Preview
  173. Minor code cleanup
  174. September 22, 2014
  175. Format conversion improvements and bug fixes (depth/stencil, alpha-only, float16, RGB -> 1 channel)
  176. Fixed issue when BC decompressing non-standard compressed rowPitch images
  177. Explicit calling-convention annotation for all 'public' functions
  178. Code cleanup
  179. Xbox One platform updates
  180. July 15, 2014
  181. texconv command-line tool fixes
  182. Fixed problem with 'wide' images with CPU Compress
  183. Updates to Xbox One platform support
  184. April 3, 2014
  185. Windows phone 8.1 platform support
  186. February 24, 2014
  187. Direct3D 11 video and Xbox One extended format support
  188. New APIs: IsPlanar, IsPalettized, IsDepthStencil, ConvertToSinglePlane
  189. Added 'alphaWeight' parameter to GPU Compress [breaking change]
  190. texconv '-aw' switch to control the alpha weighting for the BC7 GPU compressor
  191. Fixed bug with ordered dithering in non-WIC conversion codepaths
  192. Fixed SaveToDDS* functions when using arbitrary row pitch values
  193. January 24, 2014
  194. Added sRGB flags for Compress (TEX_COMPRESS_SRGB*)
  195. Added 'compress' flag parameter to GPU versions of Compress [breaking change]
  196. Minor fix for potential rounding problem in GPU Compress
  197. Code cleanup (removed DXGI_1_2_FORMATS control define; ScopedObject typedef removed)
  198. Dropped VS 2010 support without the Windows 8.1 SDK (removed USE_XNAMATH control define)
  199. December 24, 2013
  200. texconv updated with -fl and -pow2 command-line switches
  201. Fixed bug in Resize when doing custom filtering which occurred when exactly doubling the image size
  202. Added move operators to ScratchImage and Blob classes
  203. Xbox One platform support
  204. October 21, 2013
  205. Updated for Visual Studio 2013 and Windows 8.1 SDK RTM
  206. PremultiplyAlpha updated with new 'flags' parameter and to use sRGB correct blending
  207. Fixed colorspace conversion issue with DirectCompute compressor when compressing for BC7 SRGB
  208. August 13, 2013
  209. DirectCompute 4.0 BC6H/BC7 compressor integration
  210. texconv utility uses DirectCompute compression by default for BC6H/BC7, -nogpu disables use of DirectCompute
  211. August 1, 2013
  212. Support for BC compression/decompression of non-power-of-2 mipmapped textures
  213. Fixes for BC6H / BC7 codecs to better match published standard
  214. Fix for BC4 / BC5 codecs when compressing RGB images
  215. Minor fix for the BC1-3 codec
  216. New optional flags for ComputeMSE to compare UNORM vs. SNORM images
  217. New WIC loading flag added to control use of WIC metadata to return sRGB vs. non-sRGB formats
  218. Code cleanup and /analyze fixes
  219. Project file cleanup
  220. Texconv utility uses parallel BC compression by default for BC6H/BC7, -singleproc disables multithreaded behavior
  221. July 1, 2013
  222. VS 2013 Preview projects added
  223. SaveToWIC functions updated with new optional setCustomProps parameter
  224. June 15, 2013
  225. Custom filtering implementation for Resize & GenerateMipMaps(3D) - Point, Box, Linear, Cubic, and Triangle
  226. TEX_FILTER_TRIANGLE finite low-pass triangle filter
  227. TEX_FILTER_WRAP, TEX_FILTER_MIRROR texture semantics for custom filtering
  228. TEX_FILTER_BOX alias for TEX_FILTER_FANT WIC
  229. Ordered and error diffusion dithering for non-WIC conversion
  230. sRGB gamma correct custom filtering and conversion
  231. DDS_FLAGS_EXPAND_LUMINANCE - Reader conversion option for L8, L16, and A8L8 legacy DDS files
  232. Added use of WIC metadata for sRGB pixel formats
  233. Added BitsPerColor utility function
  234. Fixed Convert threshold parameter usage
  235. Non-power-of-2 volume map support, fixed bug with non-square volume maps
  236. Texconv utility update with -xlum, -wrap, and -mirror options; reworked -if options for improved dithering
  237. Texassemble utility for creating cubemaps, volume maps, and texture arrays
  238. DDSTextureLoader and WICTextureLoader sync'd with DirectXTK versions
  239. April 16, 2013
  240. Updated alpha-mode metadata details in .DDS files
  241. Added new control flags for Convert
  242. Added new optional flags for ComputeMSE
  243. Fixed conversion handling for sRGB formats
  244. Fixed internal routines for handling R10G10B10_XR_BIAS_A2_UNORM, R9G9B9E5_SHAREDEXP, and FORMAT_R1_UNORM
  245. Fixed WIC I/O for GUID_WICPixelFormat32bppRGBE pixel format files (HD Photo)
  246. Fixed non-square image handling in GenerateMipMaps3D
  247. Fixed some error handling in the DDS load code
  248. March 22, 2013
  249. Supports reading and writing alpha-mode (straight, premultiplied, etc.) metadata in .DDS files
  250. Added build option to use WICCreateImagingFactory_Proxy instead of CoCreateInstance to obtain WIC factory
  251. January 29, 2013
  252. Added PremultiplyAlpha to DirectXTex; -pmalpha switch for texconv command-line tool
  253. Fixed problem with forceSRGB implementation for Ex versions of CreateTexture, CreateShaderResourceView, DDSTextureLoader and WICTextureLoader
  254. December 11, 2012
  255. Ex versions of CreateTexture, CreateShaderResourceView, DDSTextureLoader and WICTextureLoader
  256. Fixed BC2 and BC3 decompression issue for unusual color encoding case
  257. Converted annotation to SAL2 for improved VS 2012 /analyze experience
  258. Updated DirectXTex, DDSView, and Texconv with VS 2010 + Windows 8.0 SDK project using official 'property sheets'
  259. November 15, 2012
  260. Added support for WIC2 when available on Windows 8 and Windows 7 with KB 2670838
  261. Added optional targetGUID parameter to SaveWIC* APIs to influence final container pixel format choice
  262. Fixed bug in SaveDDS* which was generating invalid DDS files for 1D dimension textures
  263. Improved robustness of CaptureTexture when resolving MSAA source textures
  264. Sync'd DDSTextureLoader, ScreenGrab, and WICTextureLoader standalone versions with latest DirectXTK release
  265. September 28, 2012
  266. Added ScreenGrab module for creating runtime screenshots
  267. Renamed project files for better naming consistency
  268. New Typeless utilities for DirectXTex
  269. Some minor code cleanup for DirectXTex's WIC writer function
  270. Bug fixes and new -tu/-tf options for texconv
  271. June 22, 2012
  272. Moved to using XNA Math 2.05 instead of XNA Math 2.04 for USE_XNAMATH builds
  273. Fixed BGR vs. RGB color channel swizzle problem with 24bpp legacy .DDS files in DirectXTex
  274. Update to DirectXTex WIC and WICTextureLoader for additional 96bpp float format handling on Windows 8
  275. May 31, 2012
  276. Minor fix for DDSTextureLoader's retry fallback that can happen with 10level9 feature levels
  277. Switched to use "_DEBUG" instead of "DEBUG" and cleaned up debug warnings
  278. added Windows Store style application project files for DirectXTex
  279. April 20, 2012
  280. DirectTex's WIC-based writer opts-in for the Windows 8 BMP encoder option for writing 32 bpp RGBA files with the BITMAPV5HEADER
  281. March 30, 2012
  282. WICTextureLoader updated with Windows 8 WIC pixel formats
  283. DirectXTex updated with limited non-power-of-2 texture support and TEX_FILTER_SEPARATE_ALPHA option
  284. Texconv updated with '-sepalpha' command-line option
  285. Added USE_XNAMATH control define to build DirectXTex using either XNAMath or DirectXMath
  286. Added VS 2012 project files (which use DirectXMath instead of XNAMath and define DXGI_1_2_FORMATS)
  287. March 15, 2012
  288. Fix for resource leak in CreateShaderResourceView() Direct3D 11 helper function in DirectXTex
  289. March 5, 2012
  290. Fix for too much temp memory allocated by WICTextureLoader; cleaned up legacy 'min/max' macro usage in DirectXTex
  291. February 21, 2012
  292. WICTextureLoader updated to handle systems and device drivers without BGRA or 16bpp format support
  293. February 20, 2012
  294. Some code cleanup for DirectXTex and DDSTextureLoader
  295. Fixed bug in 10:10:10:2 format fixup in the LoadDDSFromMemory function
  296. Fixed bugs in "non-zero alpha" special-case handling in LoadTGAFromFile
  297. Fixed bug in _SwizzleScanline when copying alpha channel for BGRA<->RGBA swizzling
  298. February 11, 2012
  299. Update of DDSTextureLoader to also build in Windows Store style apps; added WICTextureLoader
  300. Added CMYK WIC pixel formats to the DirectXTex conversion table
  301. January 30, 2012
  302. Minor code-cleanup for DirectXTex to enable use of PCH through 'directxtexp.h' header
  303. January 24, 2011
  304. Some code-cleanup for DirectXTex
  305. Added DXGI 1.2 implementation for DDSTextureLoader and DirectXTex guarded with DXGI_1_2_FORMATS compiliation define
  306. December 16, 2011
  307. Fixed x64 compilation warnings in DDSTextureLoader
  308. November 30, 2011
  309. Fixed some of the constants used in IsSupportedTexture(),
  310. added ability to strip off top levels of mips in DDSTextureLoader,
  311. changed DirectXTex to use CoCreateInstance rather than LoadLibrary to obtain the WIC factory,
  312. a few minor /analyze related annotations for DirectXTex
  313. October 27, 2011
  314. Original release