diff --git a/Adding-OpenEXR.md b/Adding-OpenEXR.md index c60e030..c5781a6 100644 --- a/Adding-OpenEXR.md +++ b/Adding-OpenEXR.md @@ -1,4 +1,4 @@ -The [OpenEXR](https://en.wikipedia.org/wiki/OpenEXR) format is a high dynamic-range (HDR) image file format developed by Industrial Light & Magic for use in computer imaging applications. It is commonly used as a source format for HDR textures. +The [OpenEXR](https://wikipedia.org/wiki/OpenEXR) format is a high dynamic-range (HDR) image file format developed by Industrial Light & Magic for use in computer imaging applications. It is commonly used as a source format for HDR textures. # Building the OpenEXR auxiliary library diff --git a/Compress.md b/Compress.md index 08e3b23..0c23190 100644 --- a/Compress.md +++ b/Compress.md @@ -63,7 +63,7 @@ _alphaWeight_: Used to weight the error metric's alpha computation for the BC7 G * ``TEX_COMPRESS_SRGB_OUT`` Indicates the output format is the sRGB format. This is implied if using a ``DXGI_FORMAT_*_SRGB`` format * ``TEX_COMPRESS_SRGB`` This is the same as setting both ``TEX_COMPRESS_SRGB_IN`` and ``TEX_COMPRESS_SRGB_OUT`` -_The [sRGB color space](http://en.wikipedia.org/wiki/SRGB) overall is approximately equivalent to gamma 2.2. It's actually linear below a threshold, and gamma 2.4 beyond that._ +_The [sRGB color space](http://wikipedia.org/wiki/SRGB) overall is approximately equivalent to gamma 2.2. It's actually linear below a threshold, and gamma 2.4 beyond that._ ## BC7 * ``TEX_COMPRESS_BC7_USE_3SUBSETS`` Indicates that BC7 compression should use the 3 subset modes (mode 0 and 2). Otherwise it skips these to improve compression performance. This does not usually have significant quality impacts as modes 0 & 2 are rarely selected. Also note that BC6H does not have 3-subset partition modes. @@ -110,9 +110,9 @@ The DirectCompute GPU-based compressor makes use of the device's immediate conte # Related Links -[Compressed Texture Resources (Direct3D 9)](https://docs.microsoft.com/en-us/windows/desktop/direct3d9/compressed-texture-resources) -[Block Compression (Direct3D 10)](https://docs.microsoft.com/en-us/windows/desktop/direct3d10/d3d10-graphics-programming-guide-resources-block-compression) -[Texture Block Compression in Direct3D 11](https://docs.microsoft.com/en-us/windows/desktop/direct3d11/texture-block-compression-in-direct3d-11) -[S3 Texture Compress](http://en.wikipedia.org/wiki/S3_Texture_Compression) -[3Dc](http://en.wikipedia.org/wiki/3Dc) +[Compressed Texture Resources (Direct3D 9)](https://docs.microsoft.com/windows/win32/direct3d9/compressed-texture-resources) +[Block Compression (Direct3D 10)](https://docs.microsoft.com/windows/win32/direct3d10/d3d10-graphics-programming-guide-resources-block-compression) +[Texture Block Compression in Direct3D 11](https://docs.microsoft.com/windows/win32/direct3d11/texture-block-compression-in-direct3d-11) +[S3 Texture Compress](http://wikipedia.org/wiki/S3_Texture_Compression) +[3Dc](http://wikipedia.org/wiki/3Dc) [OpenGL ARB BPTC](http://developer.download.nvidia.com/opengl/specs/GL_ARB_texture_compression_bptc.txt) diff --git a/ConvertToSinglePlane.md b/ConvertToSinglePlane.md index 0f93d9a..2d9ccfe 100644 --- a/ConvertToSinglePlane.md +++ b/ConvertToSinglePlane.md @@ -17,5 +17,5 @@ HRESULT ConvertToSinglePlane( # Remarks The pixel format of the resulting image is determined by the format of the input. For example NV11 and NV12 are always converted to YUY2. -[Recommended 8-Bit YUV Formats for Video Rendering](https://docs.microsoft.com/en-us/windows/desktop/medfound/recommended-8-bit-yuv-formats-for-video-rendering) -[10-bit and 16-bit YUV Video Formats](https://docs.microsoft.com/en-us/windows/desktop/medfound/10-bit-and-16-bit-yuv-video-formats) +[Recommended 8-Bit YUV Formats for Video Rendering](https://docs.microsoft.com/windows/win32/medfound/recommended-8-bit-yuv-formats-for-video-rendering) +[10-bit and 16-bit YUV Video Formats](https://docs.microsoft.com/windows/win32/medfound/10-bit-and-16-bit-yuv-video-formats) diff --git a/DDS-I-O-Functions.md b/DDS-I-O-Functions.md index 92397e4..50f58a2 100644 --- a/DDS-I-O-Functions.md +++ b/DDS-I-O-Functions.md @@ -185,7 +185,7 @@ Note that for Direct3D 11.1 video formats, only ``DXGI_FORMAT_YUY2`` is supporte # Windows Store apps -[File access and permissions (Windows Runtime apps)](https://docs.microsoft.com/en-us/windows/uwp/files/file-access-permissions) +[File access and permissions (Windows Runtime apps)](https://docs.microsoft.com/windows/uwp/files/file-access-permissions) ## Load If you wish to load a texture from a file that is specified by the user from a WinRT picker, you will need to copy the file locally to a temporary location before you can use LoadFromDDSFile on it. This is because you either won't have file access rights to the user's file location, or the StorageFile is actually not a local file system path (i.e. it's a URL). @@ -228,4 +228,4 @@ auto folder = Windows::Storage::ApplicationData::Current->TemporaryFolder; [The DDS File Format Lives](https://walbourn.github.io/the-dds-file-format-lives/) -[DDS Programmer's Guide](https://docs.microsoft.com/en-us/windows/desktop/direct3ddds/dx-graphics-dds-pguide) +[DDS Programmer's Guide](https://docs.microsoft.com/windows/win32/direct3ddds/dx-graphics-dds-pguide) diff --git a/DirectXTex.md b/DirectXTex.md index dc68887..3178e8d 100644 --- a/DirectXTex.md +++ b/DirectXTex.md @@ -17,7 +17,7 @@ The majority of the header files here are intended for internal implementation o All the functions in the library are in the **DirectX** C++ namespace. # Initialization -The library assumes that the client code will have already called ``CoInitialize``, ``CoInitializeEx``, or ``Windows::Foundation::Initialize`` as needed by the application before calling any DirectXTex routines. Most DirectXTex functions use the [Windows Imaging Component](https://docs.microsoft.com/en-us/windows/desktop/wic/-wic-about-windows-imaging-codec) which requires COM. +The library assumes that the client code will have already called ``CoInitialize``, ``CoInitializeEx``, or ``Windows::Foundation::Initialize`` as needed by the application before calling any DirectXTex routines. Most DirectXTex functions use the [Windows Imaging Component](https://docs.microsoft.com/windows/win32/wic/-wic-about-windows-imaging-codec) which requires COM. For a Universal Windows Platform (UWP) app using ``/ZW``, the Windows Runtime and COM is initialized by the C/C++ Run-Time. For C++/WinRT applications, this is done by calling ``winrt::init_apartment();``. @@ -47,7 +47,7 @@ If you need Windows Runtime functionality in your application on Windows 10, use # Functions ## DDS I/O Functions -These functions perform file I/O for [DirectDraw Surface](https://docs.microsoft.com/en-us/windows/desktop/direct3ddds/dx-graphics-dds-pguide) (``.DDS``) files. These functions support many legacy Direct3D 9 ``.DDS`` files and all [Direct3D 10.x/11.x era](https://walbourn.github.io/the-dds-file-format-lives/) ``DX10`` extension ``.DDS`` files. +These functions perform file I/O for [DirectDraw Surface](https://docs.microsoft.com/windows/win32/direct3ddds/dx-graphics-dds-pguide) (``.DDS``) files. These functions support many legacy Direct3D 9 ``.DDS`` files and all [Direct3D 10.x/11.x era](https://walbourn.github.io/the-dds-file-format-lives/) ``DX10`` extension ``.DDS`` files. * [[GetMetadataFromDDSMemory|DDS I/O Functions]] - Extracts the metadata from a ``DDS`` file in memory * [[GetMetadataFromDDSFile|DDS I/O Functions]] - Extracts the metadata from a ``DDS`` file on disk @@ -58,7 +58,7 @@ These functions perform file I/O for [DirectDraw Surface](https://docs.microsoft ## HDR I/O Functions -The [Radiance RGBE](https://en.wikipedia.org/wiki/RGBE_image_format) (``.HDR``) format is commonly used as a texture source file format in game development for high-dynamic range images, but this format is not supported by any built-in WIC codec. These functions implement a simple reader and writer for this format. +The [Radiance RGBE](https://wikipedia.org/wiki/RGBE_image_format) (``.HDR``) format is commonly used as a texture source file format in game development for high-dynamic range images, but this format is not supported by any built-in WIC codec. These functions implement a simple reader and writer for this format. * [[GetMetadataFromHDRMemory|HDR I/O Functions]] - Extracts the metadata from a ``HDR`` file in memory * [[GetMetadataFromHDRFile|HDR I/O Functions]] - Extracts the metadata from a ``HDR`` file on disk @@ -68,7 +68,7 @@ The [Radiance RGBE](https://en.wikipedia.org/wiki/RGBE_image_format) (``.HDR``) * [[SaveToHDRFile|HDR I/O Functions]] - Creates a ``HDR`` file on disk ## TGA I/O Functions -The [Targa Truevision](http://en.wikipedia.org/wiki/Truevision_TGA) (``.TGA``) format is commonly used as a texture source file format in game development, but this format is not supported by any built-in WIC codec. These functions implement a simple reader and writer for this format. +The [Targa Truevision](http://wikipedia.org/wiki/Truevision_TGA) (``.TGA``) format is commonly used as a texture source file format in game development, but this format is not supported by any built-in WIC codec. These functions implement a simple reader and writer for this format. * [[GetMetadataFromTGAMemory|TGA I/O Functions]] - Extracts the metadata from a ``TGA`` file in memory * [[GetMetadataFromTGAFile|TGA I/O Functions]] - Extracts the metadata from a ``TGA`` file on disk @@ -78,7 +78,7 @@ The [Targa Truevision](http://en.wikipedia.org/wiki/Truevision_TGA) (``.TGA``) f * [[SaveToTGAFile|TGA I/O Functions]] - Creates a ``TGA`` file on disk ## WIC I/O Functions -These functions use the [Windows Imaging Component](https://docs.microsoft.com/en-us/windows/desktop/wic/-wic-about-windows-imaging-codec) (WIC) to read or write an image file. There are built-in WIC codecs in Windows for ``.BMP``, ``.PNG``, ``.GIF``, ``.TIFF``, ``.JPEG``, and JPEG-XR / HD Photo images. Some containers (``.GIF`` and ``.TIFF``) can contain multi-frame bitmaps files. +These functions use the [Windows Imaging Component](https://docs.microsoft.com/windows/win32/wic/-wic-about-windows-imaging-codec) (WIC) to read or write an image file. There are built-in WIC codecs in Windows for ``.BMP``, ``.PNG``, ``.GIF``, ``.TIFF``, ``.JPEG``, and JPEG-XR / HD Photo images. Some containers (``.GIF`` and ``.TIFF``) can contain multi-frame bitmaps files. * [[GetMetadataFromWICMemory|WIC I/O Functions]] - Extracts the metadata from a WIC-supported file in memory * [[GetMetadataFromWICFile|WIC I/O Functions]] - Extracts the metadata from a WIC-supported file on disk @@ -229,7 +229,7 @@ See the [Visual C++ Team Blog](https://devblogs.microsoft.com/cppblog/flexible-p > DirectXTex was never supported on Windows Phone 8.0, because WIC is not available on that platform. The ``.DDS`` files it generates are suitable for use on Windows Phone 8.x assuming the pixel format is supported by the device (Feature Level 9.3). ## Using NuGet package manager -Alternatively you can use [NuGet](https://docs.microsoft.com/en-us/nuget/what-is-nuget) to install one of the DirectXTex packages. Use *Project / Manage NuGet Packages...* then select "Online" and search for "DirectXTex". +Alternatively you can use [NuGet](https://docs.microsoft.com/nuget/what-is-nuget) to install one of the DirectXTex packages. Use *Project / Manage NuGet Packages...* then select "Online" and search for "DirectXTex". @@ -275,7 +275,7 @@ The **vcpkg** port supports two optional features. The default is to build witho * ``openexr``: Adds OpenEXR support. -For [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10), use: +For [Windows Subsystem for Linux](https://docs.microsoft.com/windows/wsl/install-win10), use: ``` ./vcpkg install directxtex:x64-linux diff --git a/Filter-Flags.md b/Filter-Flags.md index a65e9b6..dec5e92 100644 --- a/Filter-Flags.md +++ b/Filter-Flags.md @@ -20,8 +20,8 @@ This selects the filtering mode used for resizing and mipmap generation. In most # Dithering This selects the use of dithering for format conversions. By default it uses no dithering. -* ``TEX_FILTER_DITHER`` 4x4 [ordered dithering](https://en.wikipedia.org/wiki/Ordered_dithering) -* ``TEX_FILTER_DITHER_DIFFUSION`` Error-diffusion dithering (aka [Floyd–Steinberg dithering](http://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dithering)) +* ``TEX_FILTER_DITHER`` 4x4 [ordered dithering](https://wikipedia.org/wiki/Ordered_dithering) +* ``TEX_FILTER_DITHER_DIFFUSION`` Error-diffusion dithering (aka [Floyd–Steinberg dithering](http://wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dithering)) # Wrap mode This controls how edge pixels are filtered. It defaults to CLAMP which is the only one supported by the WIC code paths. These have no impact on POINT or BOX filtering methods. @@ -41,7 +41,7 @@ This controls color space transformation for conversions. * ``TEX_FILTER_SRGB_OUT`` Indicates the output format is the sRGB format. This is implied if using a ``DXGI_FORMAT_*_SRGB`` format * ``TEX_FILTER_SRGB`` This is the same as setting both ``TEX_FILTER_SRGB_IN`` and ``TEX_FILTER_SRGB_OUT`` -_The [sRGB color space](http://en.wikipedia.org/wiki/SRGB) overall is approximately equivalent to gamma 2.2. It's actually linear below a threshold, and gamma 2.4 beyond that._ +_The [sRGB color space](http://wikipedia.org/wiki/SRGB) overall is approximately equivalent to gamma 2.2. It's actually linear below a threshold, and gamma 2.4 beyond that._ # WIC usage When both WIC-based and non-WIC based codepaths are in place, these flags can influence the standard logic choice. These are primarily used for testing and debugging purposes. diff --git a/HDR-I-O-Functions.md b/HDR-I-O-Functions.md index aee7e94..f23e201 100644 --- a/HDR-I-O-Functions.md +++ b/HDR-I-O-Functions.md @@ -1,7 +1,7 @@ |[[DirectXTex]]| |---| -The [Radiance RGBE](https://en.wikipedia.org/wiki/RGBE_image_format) (``.HDR``) format is commonly used as a texture source file format in game development for high-dynamic range images, but this format is not supported by any built-in WIC codec. These functions implement a simple reader and writer for this format. +The [Radiance RGBE](https://wikipedia.org/wiki/RGBE_image_format) (``.HDR``) format is commonly used as a texture source file format in game development for high-dynamic range images, but this format is not supported by any built-in WIC codec. These functions implement a simple reader and writer for this format. # GetMetadataFromHDRMemory, GetMetadataFromHDRFile Returns the _TexMetadata_ metadata from a ``.HDR`` file. @@ -84,7 +84,7 @@ if ( FAILED(hr) ) # Windows Store apps -[File access and permissions (Windows Runtime apps)](https://docs.microsoft.com/en-us/windows/uwp/files/file-access-permissions) +[File access and permissions (Windows Runtime apps)](https://docs.microsoft.com/windows/uwp/files/file-access-permissions) ## Load If you wish to load an image from a file that is specified by the user from a WinRT picker, you will need to copy the file locally to a temporary location before you can use LoadFromHDRFile on it. This is because you either won't have file access rights to the user's file location, or the StorageFile is actually not a local file system path (i.e. it's a URL). diff --git a/Image-formats.md b/Image-formats.md index 123271e..b98348e 100644 --- a/Image-formats.md +++ b/Image-formats.md @@ -1,14 +1,14 @@ -The DirectXTex library primarily uses [Windows Imaging Component](https://docs.microsoft.com/en-us/windows/desktop/wic/-wic-about-windows-imaging-codec) (aka WIC) to perform image I/O, but includes a custom codec for ``DDS``, ``HDR``, and ``TGA`` files as well as optional support for ``EXR``. A complete, detailed description of image file formats is well beyond the scope of this wiki. This page does provide a quick overview of the common formats the library is designed to read/write. +The DirectXTex library primarily uses [Windows Imaging Component](https://docs.microsoft.com/windows/win32/wic/-wic-about-windows-imaging-codec) (aka WIC) to perform image I/O, but includes a custom codec for ``DDS``, ``HDR``, and ``TGA`` files as well as optional support for ``EXR``. A complete, detailed description of image file formats is well beyond the scope of this wiki. This page does provide a quick overview of the common formats the library is designed to read/write. # BMP (Windows Bitmap Format) -The ``BMP`` file format is a long-lived Windows-specific format for images which is supported by a built-in WIC codec. See [Wikipedia](https://en.wikipedia.org/wiki/BMP_file_format) for more details. +The ``BMP`` file format is a long-lived Windows-specific format for images which is supported by a built-in WIC codec. See [Wikipedia](https://wikipedia.org/wiki/BMP_file_format) for more details. > There is an unofficial extension of BMP for DXTn compressed data that was created primarily for use by the Microsoft flight simulator team. This format is not widely useful enough to support in the DirectXTex library, but [[texconv]] supports reading them. To aid in debugging, here is a [simple console program](https://github.com/Microsoft/DirectXTex/wiki/bmpdump.cpp) for dumping out the content of a BMP header in a human-readable form. # DDS (DirectDraw Surface) -The ``DDS`` file format is not so much an image format as a "Direct3D resource" container for textures. It can contain data in all DXGI formats, 1D textures, 2D textures, 1D & 2D texture arrays, cubemaps, cubemap arrays, and volume maps. For more details, see [The DDS File Format Lives](https://walbourn.github.io/the-dds-file-format-lives/) and [DDS Programmer's Guide](https://docs.microsoft.com/en-us/windows/desktop/direct3ddds/dx-graphics-dds-pguide). +The ``DDS`` file format is not so much an image format as a "Direct3D resource" container for textures. It can contain data in all DXGI formats, 1D textures, 2D textures, 1D & 2D texture arrays, cubemaps, cubemap arrays, and volume maps. For more details, see [The DDS File Format Lives](https://walbourn.github.io/the-dds-file-format-lives/) and [DDS Programmer's Guide](https://docs.microsoft.com/windows/win32/direct3ddds/dx-graphics-dds-pguide). > Windows 8.x and Windows 10 include a built-in WIC codec which supports ``DDS`` files in DXTn (aka BC1-BC3) format. No other formats are supported. @@ -22,25 +22,25 @@ The ``EXR`` file format is a high dynamic-range (HDR) image file format develope Kainz, Bogart, and Hess. "Chapter 26. The OpenEXR Image File Format", _GPU Gems_, Addison-Wesley, 2004 [link](https://developer.nvidia.com/sites/all/modules/custom/gpugems/books/GPUGems/gpugems_ch26.html) # GIF (Graphics Interchange Format) -The ``GIF`` file format is a Web meme standard that can contain multiple 'frames' of animation, but is otherwise limited to 256 colors. It is supported by a built-in WIC codec. See [Wikipedia](https://en.wikipedia.org/wiki/GIF) for more details and history. +The ``GIF`` file format is a Web meme standard that can contain multiple 'frames' of animation, but is otherwise limited to 256 colors. It is supported by a built-in WIC codec. See [Wikipedia](https://wikipedia.org/wiki/GIF) for more details and history. # HD Photo (Windows Media Photo) -The ``WDP`` file format (aka JPEG-XR) is a High-Dynamic Range (HDR) image file format. It is supported by a built-in WIC codec. See the [HD Photo Specification](http://go.microsoft.com/fwlink/p/?linkid=74506) and [Wikipedia](https://en.wikipedia.org/wiki/JPEG_XR) for more details. +The ``WDP`` file format (aka JPEG-XR) is a High-Dynamic Range (HDR) image file format. It is supported by a built-in WIC codec. See the [HD Photo Specification](http://go.microsoft.com/fwlink/p/?linkid=74506) and [Wikipedia](https://wikipedia.org/wiki/JPEG_XR) for more details. > Note that the Xbox One XDK version of WIC does not include the HD Photo codec. # HDR (Radiance RGBE) -The ``HDR`` file format is a High-Dynamic Range (HDR) image file format, and is commonly used as a source for textures. See [Wikipedia](https://en.wikipedia.org/wiki/RGBE_image_format) for more details. +The ``HDR`` file format is a High-Dynamic Range (HDR) image file format, and is commonly used as a source for textures. See [Wikipedia](https://wikipedia.org/wiki/RGBE_image_format) for more details. Greg Ward, "Real Pixels", *Graphics Gems II*, James Arvo (editor), Academic Press, 1991, ISBN: 0120644819, p. 80-83 ([code](http://www.realtimerendering.com/resources/GraphicsGems/gemsii/RealPixels/)) To aid in debugging, here is a [simple console program](https://github.com/Microsoft/DirectXTex/wiki/hdrdump.cpp) for dumping out the content of a HDR header. # JPEG (Joint Photographic Experts Group) -The ``JPG`` or ``JPEG`` file format is a lossy compressed image file format commonly used for photos. See [Independent JPEG Group](http://ijg.org/) and [Wikipedia](https://en.wikipedia.org/wiki/JPEG) for more details. +The ``JPG`` or ``JPEG`` file format is a lossy compressed image file format commonly used for photos. See [Independent JPEG Group](http://ijg.org/) and [Wikipedia](https://wikipedia.org/wiki/JPEG) for more details. # PNG (Portable Network Graphics) -The ``PNG`` file format is a commonly used lossless compressed image file format, which has largely taken over for ``GIF`` in use for general web graphics. See [libpng](http://libpng.org/pub/png/libpng.html) and [Wikipedia](https://en.wikipedia.org/wiki/Portable_Network_Graphics) for more details and history. +The ``PNG`` file format is a commonly used lossless compressed image file format, which has largely taken over for ``GIF`` in use for general web graphics. See [libpng](http://libpng.org/pub/png/libpng.html) and [Wikipedia](https://wikipedia.org/wiki/Portable_Network_Graphics) for more details and history. # PPM/PFM (Portable PixMap/Portable Float Map) The ``PPM`` file is an 80s era extremely simple file format that supports RGB values in ASCII or binary format. ``PFM`` is an extension of this format for floating-point RGB values. This format does not support compression or alpha channels, and it's primary utility is for loading some academic-provided image data. @@ -54,9 +54,9 @@ See [PPM / PGM / PBM image files](http://paulbourke.net/dataformats/ppm/) and [U > The original proposal for PFM states there are no ``# comment lines`` like in ``ppm``. That said some tools like to add comments unless you explicitly tell them to not add them. D3DX9 fails to load a ``pfm`` with header comments. # TIFF (Tagged Image File Format) -The ``TIF`` or ``TIFF`` file format is kind of meta-container that is often used for image files used in various compressed formats, as well as other application. The image uses of this file format are supported by a built-in WIC codec. See [Wikipedia](https://en.wikipedia.org/wiki/Tagged_Image_File_Format) for more details. +The ``TIF`` or ``TIFF`` file format is kind of meta-container that is often used for image files used in various compressed formats, as well as other application. The image uses of this file format are supported by a built-in WIC codec. See [Wikipedia](https://wikipedia.org/wiki/Tagged_Image_File_Format) for more details. # TGA (Truevision Graphics Adapter) -The ``TGA`` file format is one of the earliest and simplest file formats for 24-bits-per-pixel images, and is commonly used as a source file for textures. See [Wikipedia](https://en.wikipedia.org/wiki/Truevision_TGA), [this text file](http://www.gamers.org/dEngine/quake3/TGA.txt), and the [Version 2.0 specification](http://www.dca.fee.unicamp.br/~martino/disciplinas/ea978/tgaffs.pdf) for more details. +The ``TGA`` file format is one of the earliest and simplest file formats for 24-bits-per-pixel images, and is commonly used as a source file for textures. See [Wikipedia](https://wikipedia.org/wiki/Truevision_TGA), [this text file](http://www.gamers.org/dEngine/quake3/TGA.txt), and the [Version 2.0 specification](http://www.dca.fee.unicamp.br/~martino/disciplinas/ea978/tgaffs.pdf) for more details. To aid in debugging, here is a [simple console program](https://github.com/Microsoft/DirectXTex/wiki/tgadump.cpp) for dumping out the content of a TGA header in a human-readable form. diff --git a/Resources.md b/Resources.md index 7f0075f..1af0d09 100644 --- a/Resources.md +++ b/Resources.md @@ -29,20 +29,20 @@ Gamefest 2010 - [Block Compression Smorgasbord](http://download.microsoft.com/do [The DDS File Format Lives](https://walbourn.github.io/the-dds-file-format-lives/) # Microsoft Docs -[DDS Programmer's Guide](https://docs.microsoft.com/en-us/windows/desktop/direct3ddds/dx-graphics-dds-pguide) +[DDS Programmer's Guide](https://docs.microsoft.com/windows/win32/direct3ddds/dx-graphics-dds-pguide) -[Compressed Texture Resources (Direct3D 9)](https://docs.microsoft.com/en-us/windows/desktop/direct3d9/compressed-texture-resources) +[Compressed Texture Resources (Direct3D 9)](https://docs.microsoft.com/windows/win32/direct3d9/compressed-texture-resources) -[Block Compression (Direct3D 10)](https://docs.microsoft.com/en-us/windows/desktop/direct3d10/d3d10-graphics-programming-guide-resources-block-compression) +[Block Compression (Direct3D 10)](https://docs.microsoft.com/windows/win32/direct3d10/d3d10-graphics-programming-guide-resources-block-compression) -[Texture Block Compression in Direct3D 11](https://docs.microsoft.com/en-us/windows/desktop/direct3d11/texture-block-compression-in-direct3d-11) +[Texture Block Compression in Direct3D 11](https://docs.microsoft.com/windows/win32/direct3d11/texture-block-compression-in-direct3d-11) # Block compression [Understanding BCn Texture Compression Formats](http://www.reedbeta.com/blog/2012/02/12/understanding-bcn-texture-compression-formats/) -[BC1, BC2, and BC3 use the S3 Texture Compression (S3TC) algorithm](http://en.wikipedia.org/wiki/S3_Texture_Compression) +[BC1, BC2, and BC3 use the S3 Texture Compression (S3TC) algorithm](http://wikipedia.org/wiki/S3_Texture_Compression) -[BC4 is the 3Dc+ algorithm, BC5 is 3Dc algorithm originally developed by ATI](http://en.wikipedia.org/wiki/3Dc) +[BC4 is the 3Dc+ algorithm, BC5 is 3Dc algorithm originally developed by ATI](http://wikipedia.org/wiki/3Dc) [BC6H and BC7 use the BPTC algorithm originally developed by NVIDIA](http://developer.download.nvidia.com/opengl/specs/GL_ARB_texture_compression_bptc.txt) @@ -66,7 +66,7 @@ Fast Block Compress Xbox One sample [link](https://github.com/microsoft/Xbox-ATG "Real-Time BC6H Compression on GPU" by Narkowicz (GDC2016) [link](https://knarkowicz.files.wordpress.com/2016/03/knarkowicz_realtime_bc6h_gdc_2016.pdf) [source](https://github.com/knarkowicz/GPURealTimeBC6H) # Gamma correct rendering -[Gamma correction](http://en.wikipedia.org/wiki/Gamma_correction) +[Gamma correction](http://wikipedia.org/wiki/Gamma_correction) [Linear-Space Lighting (i.e. Gamma)](http://filmicworlds.com/blog/linear-space-lighting-i-e-gamma/) diff --git a/TGA-I-O-Functions.md b/TGA-I-O-Functions.md index 7e6c888..313d0fe 100644 --- a/TGA-I-O-Functions.md +++ b/TGA-I-O-Functions.md @@ -1,7 +1,7 @@ |[[DirectXTex]]| |---| -The [Targa Truvision](http://en.wikipedia.org/wiki/Truevision_TGA) (``.TGA``) format is commonly used as a texture source file format in game development, but this format is not supported by any built-in WIC codec. These functions implement a simple reader and writer for this format. +The [Targa Truvision](http://wikipedia.org/wiki/Truevision_TGA) (``.TGA``) format is commonly used as a texture source file format in game development, but this format is not supported by any built-in WIC codec. These functions implement a simple reader and writer for this format. # GetMetadataFromTGAMemory, GetMetadataFromTGAFile Returns the _TexMetadata_ metadata from a ``.TGA`` file. @@ -127,7 +127,7 @@ if ( FAILED(hr) ) # Windows Store apps -[File access and permissions (Windows Runtime apps)](https://docs.microsoft.com/en-us/windows/uwp/files/file-access-permissions) +[File access and permissions (Windows Runtime apps)](https://docs.microsoft.com/windows/uwp/files/file-access-permissions) ## Load If you wish to load an image from a file that is specified by the user from a WinRT picker, you will need to copy the file locally to a temporary location before you can use LoadFromTGAFile on it. This is because you either won't have file access rights to the user's file location, or the StorageFile is actually not a local file system path (i.e. it's a URL). diff --git a/Texassemble.md b/Texassemble.md index b23961d..111c324 100644 --- a/Texassemble.md +++ b/Texassemble.md @@ -84,7 +84,7 @@ The file-name parameter indicates the file(s) to use to create the assembled ima **-bgcolor**: When doing the ``gif`` command, by default it always uses a transparent background color which is consistent with most browsers. You can choose to use the background color metadata in the file with this switch instead, but the results are not likely to match most viewers. -**-swizzle _rgbamask_**: When doing the ``merge`` command, by default it uses the Blue channel from the second image as the Alpha channel for the output; pulling Red, Green, and Blue from the first image which is same as the mask ``rgbB``. This option lets you provide alternative channel patterns using [HLSL-style](https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx9-graphics-reference-asm-ps-registers-modifiers-source-register-swizzling) swizzle masks. Lowercase letters indicate channels pulled from the first image (``rgbaxyzw``), and uppercase letters indicate the second image (``RGBAXYZW``). The mask is 1 to 4 characters in length. A ``0`` indicates setting that channel to zero, a ``1`` indicates setting that channel to maximum. +**-swizzle _rgbamask_**: When doing the ``merge`` command, by default it uses the Blue channel from the second image as the Alpha channel for the output; pulling Red, Green, and Blue from the first image which is same as the mask ``rgbB``. This option lets you provide alternative channel patterns using [HLSL-style](https://docs.microsoft.com/windows/win32/direct3dhlsl/dx9-graphics-reference-asm-ps-registers-modifiers-source-register-swizzling) swizzle masks. Lowercase letters indicate channels pulled from the first image (``rgbaxyzw``), and uppercase letters indicate the second image (``RGBAXYZW``). The mask is 1 to 4 characters in length. A ``0`` indicates setting that channel to zero, a ``1`` indicates setting that channel to maximum. > The ``merge`` command default swizzle mask matches the legacy DirectX Texture Tool behavior when doing "Open Alpha onto Surface..." diff --git a/Texconv.md b/Texconv.md index 25ade86..5c4a2a1 100644 --- a/Texconv.md +++ b/Texconv.md @@ -4,7 +4,7 @@ This DirectXTex sample is an implementation of the **texconv** command-line text > To create cubemaps, volume maps, or texture arrays from individual files, use [[Texassemble]]. -*The 'texconv' in the [Azure Remote Rendering](https://docs.microsoft.com/en-us/azure/remote-rendering/) tooling is completely unrelated to this 'texconv' tool.* +*The 'texconv' in the [Azure Remote Rendering](https://docs.microsoft.com/azure/remote-rendering/) tooling is completely unrelated to this 'texconv' tool.* # Syntax ``Texconv.exe`` uses the following command syntax: @@ -152,7 +152,7 @@ The file-name parameter indicates the file(s) to convert using ``dds``, ``tga``, **-aw _number_**: Provides an alpha weighting to use with the error metric for the BC7 GPU compressor. Defaults to 1.0. -**-c _color_**: Provides a colorkey/[chromakey](https://en.wikipedia.org/wiki/Chroma_key) value which is used to replace a specific RGB color in hexadecimal (within a tolerance) with alpha 0.0. Any existing color channel is overwritten. For example, ``-c 0000FF`` for a blue colorkey, ``-c 00FF00`` for a green colorkey, ``-c 0CFF5D`` for the typical 'green-screen' in a video. +**-c _color_**: Provides a colorkey/[chromakey](https://wikipedia.org/wiki/Chroma_key) value which is used to replace a specific RGB color in hexadecimal (within a tolerance) with alpha 0.0. Any existing color channel is overwritten. For example, ``-c 0000FF`` for a blue colorkey, ``-c 00FF00`` for a green colorkey, ``-c 0CFF5D`` for the typical 'green-screen' in a video. **-rotatecolor _rot_**: Performs color rotations and/or ST.2084 curves for converting image data to/from HDR10 signals. @@ -175,12 +175,12 @@ The file-name parameter indicates the file(s) to convert using ``dds``, ``tga``, **-reconstructz**: Rebuilds the Z (blue) channel assuming X/Y are normals (primarily for converting from the BC5 format) -**-swizzle _rgbamask_**: Swizzles image channels using an [HLSL-style](https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx9-graphics-reference-asm-ps-registers-modifiers-source-register-swizzling) mask (``rgba``, ``rrra``, ``r``, ``a``, ``xy``, etc.). The mask is 1 to 4 characters in length. A ``0`` indicates setting that channel to zero, a ``1`` indicates setting that channel to maximum. +**-swizzle _rgbamask_**: Swizzles image channels using an [HLSL-style](https://docs.microsoft.com/windows/win32/direct3dhlsl/dx9-graphics-reference-asm-ps-registers-modifiers-source-register-swizzling) mask (``rgba``, ``rrra``, ``r``, ``a``, ``xy``, etc.). The mask is 1 to 4 characters in length. A ``0`` indicates setting that channel to zero, a ``1`` indicates setting that channel to maximum. > Run without any command-line options for a full list of options. # Examples -Open a [Command Prompt](http://windows.microsoft.com/en-us/windows/command-prompt-faq), and change to the directory containing Texconv.exe (i.e. `...\DirectXTex\Texconv\Release`) +Open a Command Prompt, and change to the directory containing Texconv.exe (i.e. `...\DirectXTex\Texconv\Release`) Enter the following command-line after changing to the appropriate directory: diff --git a/TransformImage.md b/TransformImage.md index c128c5a..ea49e06 100644 --- a/TransformImage.md +++ b/TransformImage.md @@ -26,7 +26,7 @@ HRESULT TransformImage( _pixelFunc_: A callback function to invoke for each scanline of the image which outputs the new scanline. # Example -This function performs a colorkey or [chromakey](https://en.wikipedia.org/wiki/Chroma_key) transformation setting alpha to 0 (transparent) wherever the color is found and 1 (opaque) otherwise. +This function performs a colorkey or [chromakey](https://wikipedia.org/wiki/Chroma_key) transformation setting alpha to 0 (transparent) wherever the color is found and 1 (opaque) otherwise. ```cpp ScratchImage result; diff --git a/WIC-I-O-Functions.md b/WIC-I-O-Functions.md index 494c6e5..e522223 100644 --- a/WIC-I-O-Functions.md +++ b/WIC-I-O-Functions.md @@ -83,7 +83,7 @@ if ( FAILED(hr) ) // error ``` -Here we provide an optional callback to check for the [System.Photo.Orientation](https://docs.microsoft.com/en-us/windows/desktop/properties/props-system-photo-orientation) metadata query property: +Here we provide an optional callback to check for the [System.Photo.Orientation](https://docs.microsoft.com/windows/win32/properties/props-system-photo-orientation) metadata query property: ```cpp TexMetadata info; @@ -228,7 +228,7 @@ See [Windows Imaging Component and Windows 8](https://walbourn.github.io/windows # Windows Store apps -[File access and permissions (Windows Runtime apps)](https://docs.microsoft.com/en-us/windows/uwp/files/file-access-permissions) +[File access and permissions (Windows Runtime apps)](https://docs.microsoft.com/windows/uwp/files/file-access-permissions) ## Load If you wish to load an image from a file that is specified by the user from a WinRT picker, you will need to copy the file locally to a temporary location before you can use LoadFromWICFile on it. This is because you either won't have file access rights to the user's file location, or the StorageFile is actually not a local file system path (i.e. it's a URL).