Quantcast
Channel: DirectXTex texture processing library
Viewing all 1174 articles
Browse latest View live

Commented Unassigned: Some bugs in _DecodeMultiframe [1326]

$
0
0
#Incorrect format
DirectXTexWIC.cpp:
```
hr = FC->Initialize( frame.Get(), pfGuid, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );
if ( FAILED(hr) )
return hr;
```
The param "pfGuid" is the src format. I use "sourceGUID" to instead it and it works correctly.
```
hr = FC->Initialize( frame.Get(), sourceGUID, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );
if ( FAILED(hr) )
return hr;
```
Comments: ** Comment from web user: NinjaRhyme **

There is the code that I use to load the GIF picture:
```
WCHAR ext[_MAX_EXT];
_wsplitpath_s(_file, nullptr, 0, nullptr, 0, nullptr, 0, ext, _MAX_EXT);

ScratchImage image;
HRESULT hr;
if (_wcsicmp(ext, L".dds") == 0)
{
hr = LoadFromDDSFile(_file, DDS_FLAGS_FORCE_RGB, nullptr, image);
}
else if (_wcsicmp(ext, L".tga") == 0)
{
hr = LoadFromTGAFile(_file, nullptr, image);
}
else
{
hr = LoadFromWICFile(_file, WIC_FLAGS_ALL_FRAMES | WIC_FLAGS_FORCE_RGB | WIC_FLAGS_IGNORE_SRGB, nullptr, image);
}
if (SUCCEEDED(hr))
{
ID3D11Device *device = EECore::s_EECore->GetDevice();
ID3D11ShaderResourceView *texture = nullptr;
hr = CreateShaderResourceViewEx(device,
image.GetImages(), image.GetImageCount(), image.GetMetadata(),
D3D11_USAGE_DEFAULT, D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_UNORDERED_ACCESS, 0, 0, false,
&texture);
//use the texture

return true;
}

return false;
```


Commented Unassigned: Some bugs in _DecodeMultiframe [1326]

$
0
0
#Incorrect format
DirectXTexWIC.cpp:
```
hr = FC->Initialize( frame.Get(), pfGuid, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );
if ( FAILED(hr) )
return hr;
```
The param "pfGuid" is the src format. I use "sourceGUID" to instead it and it works correctly.
```
hr = FC->Initialize( frame.Get(), sourceGUID, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );
if ( FAILED(hr) )
return hr;
```
Comments: ** Comment from web user: NinjaRhyme **

There is the code that I use to load the GIF picture:
```
WCHAR ext[_MAX_EXT];
_wsplitpath_s(_file, nullptr, 0, nullptr, 0, nullptr, 0, ext, _MAX_EXT);

ScratchImage image;
HRESULT hr;
if (_wcsicmp(ext, L".dds") == 0)
{
hr = LoadFromDDSFile(_file, DDS_FLAGS_FORCE_RGB, nullptr, image);
}
else if (_wcsicmp(ext, L".tga") == 0)
{
hr = LoadFromTGAFile(_file, nullptr, image);
}
else
{
hr = LoadFromWICFile(_file, WIC_FLAGS_ALL_FRAMES | WIC_FLAGS_FORCE_RGB | WIC_FLAGS_IGNORE_SRGB, nullptr, image);
}
if (SUCCEEDED(hr))
{
ID3D11Device *device = EECore::s_EECore->GetDevice();
ID3D11ShaderResourceView *texture = nullptr;
hr = CreateShaderResourceViewEx(device,
image.GetImages(), image.GetImageCount(), image.GetMetadata(),
D3D11_USAGE_DEFAULT, D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_UNORDERED_ACCESS, 0, 0, false,
&texture);
//use the texture

return true;
}

return false;
```

Commented Unassigned: Some bugs in _DecodeMultiframe [1326]

$
0
0
#Incorrect format
DirectXTexWIC.cpp:
```
hr = FC->Initialize( frame.Get(), pfGuid, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );
if ( FAILED(hr) )
return hr;
```
The param "pfGuid" is the src format. I use "sourceGUID" to instead it and it works correctly.
```
hr = FC->Initialize( frame.Get(), sourceGUID, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );
if ( FAILED(hr) )
return hr;
```
Comments: ** Comment from web user: NinjaRhyme **

Sorry... My network is poor now.

Commented Unassigned: Some bugs in _DecodeMultiframe [1326]

$
0
0
#Incorrect format
DirectXTexWIC.cpp:
```
hr = FC->Initialize( frame.Get(), pfGuid, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );
if ( FAILED(hr) )
return hr;
```
The param "pfGuid" is the src format. I use "sourceGUID" to instead it and it works correctly.
```
hr = FC->Initialize( frame.Get(), sourceGUID, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );
if ( FAILED(hr) )
return hr;
```
Comments: ** Comment from web user: walbourn **

OK, I'll see if I can make an example myself that repros the problem.

Note that a much more efficient way to do this would be to confirm the GIF to a texture array DDS offline with [texconv](https://directxtex.codeplex.com/wikipage?title=Texconv) (once I fix the loading bug here of course), and then use [DDSTextureLoader](https://directxtex.codeplex.com/wikipage?title=DDSTextureLoader) to load it--assume you can require Feature Level 10.0 or later. Otherwise, you should consider making a [sprite-sheet](https://directxtk.codeplex.com/wikipage?title=SpriteSheet) texture instead as a DDS.

Commented Unassigned: Some bugs in _DecodeMultiframe [1326]

$
0
0
#Incorrect format
DirectXTexWIC.cpp:
```
hr = FC->Initialize( frame.Get(), pfGuid, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );
if ( FAILED(hr) )
return hr;
```
The param "pfGuid" is the src format. I use "sourceGUID" to instead it and it works correctly.
```
hr = FC->Initialize( frame.Get(), sourceGUID, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );
if ( FAILED(hr) )
return hr;
```
Comments: ** Comment from web user: walbourn **

Sorry, /s/confirm/convert

Commented Unassigned: Some bugs in _DecodeMultiframe [1326]

$
0
0
#Incorrect format
DirectXTexWIC.cpp:
```
hr = FC->Initialize( frame.Get(), pfGuid, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );
if ( FAILED(hr) )
return hr;
```
The param "pfGuid" is the src format. I use "sourceGUID" to instead it and it works correctly.
```
hr = FC->Initialize( frame.Get(), sourceGUID, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );
if ( FAILED(hr) )
return hr;
```
Comments: ** Comment from web user: walbourn **

So the problem is that when I coded WIC decode-multiframe, I didn't realize at the time that BitmapScaler would return a different format...

Commented Unassigned: Some bugs in _DecodeMultiframe [1326]

$
0
0
#Incorrect format
DirectXTexWIC.cpp:
```
hr = FC->Initialize( frame.Get(), pfGuid, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );
if ( FAILED(hr) )
return hr;
```
The param "pfGuid" is the src format. I use "sourceGUID" to instead it and it works correctly.
```
hr = FC->Initialize( frame.Get(), sourceGUID, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );
if ( FAILED(hr) )
return hr;
```
Comments: ** Comment from web user: walbourn **

OK, reworked the logic to actually work as intended:

```
if (w & h match target)
{
if ( same format ) then copy
else format convert
}
else
{
scale to new size
if (scaler format matches target format) then copy
else format convert from scaler
}
```

Closed Unassigned: Some bugs in _DecodeMultiframe [1326]

$
0
0
#Incorrect format
DirectXTexWIC.cpp:
```
hr = FC->Initialize( frame.Get(), pfGuid, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );
if ( FAILED(hr) )
return hr;
```
The param "pfGuid" is the src format. I use "sourceGUID" to instead it and it works correctly.
```
hr = FC->Initialize( frame.Get(), sourceGUID, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );
if ( FAILED(hr) )
return hr;
```
Comments: Resolved with changeset 40048: Fixed bugs in WIC loader for multframe images when resizing was required
- texconv & texassemble now load multi-frames if present from WIC files (tiff, gif)

Source code checked in, #40048

$
0
0
Fixed bugs in WIC loader for multframe images when resizing was required - texconv & texassemble now load multi-frames if present from WIC files (tiff, gif)

Source code checked in, #40068

$
0
0
texassemble: update to utilize multiframe inputs

Source code checked in, #40241

$
0
0
Support for universal Windows apps Technical Preview

Source code checked in, #40244

$
0
0
Updated libraries fro VS 2015 C99 and legacy printf conformance - Static libraries built with _CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS

Source code checked in, #40342

Updated Wiki: Resources

$
0
0

Presentations

Gamefest 2011 - Presentation Modern Texture Content Pipelines
http://www.microsoft.com/download/en/details.aspx?id=27853

Gamefest 2010 - Block Compression Smorgasbord
http://download.microsoft.com/download/D/8/D/D8D077EF-CB8C-4CCA-BC24-F2CDE3F91FAA/Block_Compression_Smorgasbord_US.zip

Blog posts

DirectX SDK and Games for Windows Blog
http://blogs.msdn.com/b/chuckw/archive/2014/07/31/codeplex-july-2014-refresh.aspx

http://blogs.msdn.com/b/chuckw/archive/2013/10/29/codeplex-vs-2013-refresh.aspx

http://blogs.msdn.com/b/chuckw/archive/2013/08/15/directxtex-and-effects-11-update.aspx

http://blogs.msdn.com/b/chuckw/archive/2013/06/15/directxtex-update.aspx

http://blogs.msdn.com/b/chuckw/archive/2011/10/28/directxtex.aspx

http://blogs.msdn.com/b/chuckw/archive/2012/05/04/direct3d-11-textures-and-block-compression.aspx

http://blogs.msdn.com/b/chuckw/archive/2012/11/19/windows-imaging-component-and-windows-8.aspx

http://blogs.msdn.com/b/chuckw/archive/2013/10/18/visual-studio-2013-and-windows-8-1-sdk-rtm-are-now-available.aspx

http://blogs.msdn.com/b/chuckw/archive/2012/08/15/visual-studio-2012-and-windows-8-0-sdk-rtm-are-now-available.aspx

MSDN

DDS Programmer's Guide
http://msdn.microsoft.com/en-us/library/bb943991.aspx

http://blogs.msdn.com/b/chuckw/archive/2010/02/05/the-dds-file-format-lives.aspx

Block compression

http://msdn.microsoft.com/en-us/library/bb204843.aspx

http://msdn.microsoft.com/en-us/library/bb694531.aspx

http://msdn.microsoft.com/en-us/library/windows/desktop/hh308955.aspx

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

BC4 is the 3Dc+ algorithm, BC5 is 3Dc algorithm originally developed by ATI
http://en.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

'Fast Block Compression' schemes
BC1 & BC3 algorithm from "Real-Time DXT Compression" by JMP van Waveren
http://www.nvidia.com/object/real-time-ycocg-dxt-compression.html
http://software.intel.com/en-us/articles/fast-cpu-dxt-compression

BC5 algorithm from "Real-Time Normal Map DXT Compression" by JMP van Waveren & Ignacio Castaño
http://www.nvidia.com/object/real-time-normal-map-dxt-compression.html

BC6H
https://software.intel.com/en-us/articles/fast-ispc-texture-compressor-update

BC7
http://software.intel.com/en-us/articles/fast-ispc-texture-compressor
http://gamma.cs.unc.edu/FasTC/

Gamma correct rendering

http://molecularmusings.wordpress.com/2011/11/21/gamma-correct-rendering/

http://filmicgames.com/archives/299

http://en.wikipedia.org/wiki/Gamma_correction

http://http.developer.nvidia.com/GPUGems3/gpugems3_ch24.html

Samples

http://go.microsoft.com/fwlink/?LinkId=254494

Related KB articles

http://support.microsoft.com/kb/2670838

Updated Wiki: Version History

$
0
0
March 27, 2015
  • Added projects for Windows apps Technical Preview
  • Fixed bug with WIC-based mipmap generation for non-WIC supported formats
  • Fixed bug with WIC multiframe loader when resizing required
  • texconv: Added -nmap/-nmapamp for generating normal maps from height maps
  • texconv/texassemble: Updated to load multiframe WIC files (tiff, gif)
  • Minor code cleanup

November 24, 2014
  • Updates for Visual Studio 2015 Technical Preview
  • Minor code cleanup

September 22, 2014
  • Format conversion improvements and bug fixes (depth/stencil, alpha-only, float16, RGB -> 1 channel)
  • Fixed issue when BC decompressing non-standard compressed rowPitch images
  • Explicit calling-convention annotation for all 'public' functions
  • Code cleanup
  • Xbox One platform updates

July 15, 2014
  • texconv command-line tool fixes
  • Fixed problem with 'wide' images with CPU Compress
  • Updates to Xbox One platform support

April 3, 2014
  • Windows phone 8.1 platform support

February 24, 2014
  • Direct3D 11 video and Xbox One extended format support
  • New APIs: IsPlanar, IsPalettized, IsDepthStencil, ConvertToSinglePlane
  • Added 'alphaWeight' parameter to GPU Compress [breaking change]
  • texconv '-aw' switch to control the alpha weighting for the BC7 GPU compressor
  • Fixed bug with ordered dithering in non-WIC conversion codepaths
  • Fixed SaveToDDS* functions when using arbitrary row pitch values

January 24, 2014
  • Added sRGB flags for Compress (TEX_COMPRESS_SRGB*)
  • Added 'compress' flag parameter to GPU versions of Compress [breaking change]
  • Minor fix for potential rounding problem in GPU Compress
  • Code cleanup (removed DXGI_1_2_FORMATS control define; ScopedObject typedef removed)
  • Dropped VS 2010 support without the Windows 8.1 SDK (removed USE_XNAMATH control define)

December 24, 2013
  • texconv updated with -fl and -pow2 command-line switches
  • Fixed bug in Resize when doing custom filtering which occurred when exactly doubling the image size
  • Added move operators to ScratchImage and Blob classes
  • Xbox One platform support

October 21, 2013
  • Updated for Visual Studio 2013 and Windows 8.1 SDK RTM
  • PremultiplyAlpha updated with new 'flags' parameter and to use sRGB correct blending
  • Fixed colorspace conversion issue with DirectCompute compressor when compressing for BC7 SRGB

August 13, 2013
  • DirectCompute 4.0 BC6H/BC7 compressor integration
  • texconv utility uses DirectCompute compression by default for BC6H/BC7, -nogpu disables use of DirectCompute

August 1, 2013
  • Support for BC compression/decompression of non-power-of-2 mipmapped textures
  • Fixes for BC6H / BC7 codecs to better match published standard
  • Fix for BC4 / BC5 codecs when compressing RGB images
  • Minor fix for the BC1-3 codec
  • New optional flags for ComputeMSE to compare UNORM vs. SNORM images
  • New WIC loading flag added to control use of WIC metadata to return sRGB vs. non-sRGB formats
  • Code cleanup and /analyze fixes
  • Project file cleanup
  • Texconv utility uses parallel BC compression by default for BC6H/BC7, -singleproc disables multithreaded behavior

July 1, 2013
  • VS 2013 Preview projects added
  • SaveToWIC functions updated with new optional setCustomProps parameter

June 15, 2013
  • Custom filtering implementation for Resize & GenerateMipMaps(3D) - Point, Box, Linear, Cubic, and Triangle
    • TEX_FILTER_TRIANGLE finite low-pass triangle filter
    • TEX_FILTER_WRAP, TEX_FILTER_MIRROR texture semantics for custom filtering
    • TEX_FILTER_BOX alias for TEX_FILTER_FANT WIC
  • Ordered and error diffusion dithering for non-WIC conversion
  • sRGB gamma correct custom filtering and conversion
  • DDS_FLAGS_EXPAND_LUMINANCE - Reader conversion option for L8, L16, and A8L8 legacy DDS files
  • Added use of WIC metadata for sRGB pixel formats
  • Added BitsPerColor utility function
  • Fixed Convert threshold parameter usage
  • Non-power-of-2 volume map support, fixed bug with non-square volume maps
  • Texconv utility update with -xlum, -wrap, and -mirror options; reworked -if options for improved dithering
  • Texassemble utility for creating cubemaps, volume maps, and texture arrays
  • DDSTextureLoader and WICTextureLoader sync'd with DirectXTK versions

April 16, 2013
  • Updated alpha-mode metadata details in .DDS files
  • Added new control flags for Convert
  • Added new optional flags for ComputeMSE
  • Fixed conversion handling for sRGB formats
  • Fixed internal routines for handling R10G10B10_XR_BIAS_A2_UNORM, R9G9B9E5_SHAREDEXP, and FORMAT_R1_UNORM
  • Fixed WIC I/O for GUID_WICPixelFormat32bppRGBE pixel format files (HD Photo)
  • Fixed non-square image handling in GenerateMipMaps3D
  • Fixed some error handling in the DDS load code

March 22, 2013
  • Supports reading and writing alpha-mode (straight, premultiplied, etc.) metadata in .DDS files
  • Added build option to use WICCreateImagingFactory_Proxy instead of CoCreateInstance to obtain WIC factory

January 29, 2013
  • Added PremultiplyAlpha to DirectXTex; -pmalpha switch for texconv command-line tool
  • Fixed problem with forceSRGB implementation for Ex versions of CreateTexture, CreateShaderResourceView, DDSTextureLoader and WICTextureLoader

December 11, 2012
  • Ex versions of CreateTexture, CreateShaderResourceView, DDSTextureLoader and WICTextureLoader
  • Fixed BC2 and BC3 decompression issue for unusual color encoding case
  • Converted annotation to SAL2 for improved VS 2012 /analyze experience
  • Updated DirectXTex, DDSView, and Texconv with VS 2010 + Windows 8.0 SDK project using official 'property sheets'

November 15, 2012
  • Added support for WIC2 when available on Windows 8 and Windows 7 with KB 2670838
  • Added optional targetGUID parameter to SaveWIC* APIs to influence final container pixel format choice
  • Fixed bug in SaveDDS* which was generating invalid DDS files for 1D dimension textures
  • Improved robustness of CaptureTexture when resolving MSAA source textures
  • Sync'd DDSTextureLoader, ScreenGrab, and WICTextureLoader standalone versions with latest DirectXTK release

September 28, 2012
  • Added ScreenGrab module for creating runtime screenshots
  • Renamed project files for better naming consistency
  • New Typeless utilities for DirectXTex
  • Some minor code cleanup for DirectXTex's WIC writer function
  • Bug fixes and new -tu/-tf options for texconv

June 22, 2012
  • Moved to using XNA Math 2.05 instead of XNA Math 2.04 for USE_XNAMATH builds
  • Fixed BGR vs. RGB color channel swizzle problem with 24bpp legacy .DDS files in DirectXTex
  • Update to DirectXTex WIC and WICTextureLoader for additional 96bpp float format handling on Windows 8

May 31, 2012
  • Minor fix for DDSTextureLoader's retry fallback that can happen with 10level9 feature levels
  • Switched to use "_DEBUG" instead of "DEBUG" and cleaned up debug warnings
  • added Metro style application project files for DirectXTex

April 20, 2012
  • DirectTex's WIC-based writer opts-in for the Windows 8 BMP encoder option for writing 32 bpp RGBA files with the BITMAPV5HEADER

March 30, 2012
  • WICTextureLoader updated with Windows 8 WIC pixel formats DirectXTex updated with limited non-power-of-2 texture support and TEX_FILTER_SEPARATE_ALPHA option
  • Texconv updated with '-sepalpha' command-line option
  • Added USE_XNAMATH control define to build DirectXTex using either XNAMath or DirectXMath
  • Added VS 2012 project files (which use DirectXMath instead of XNAMath and define DXGI_1_2_FORMATS)

March 15, 2012
  • Fix for resource leak in CreateShaderResourceView() Direct3D 11 helper function in DirectXTex

March 5, 2012
  • Fix for too much temp memory allocated by WICTextureLoader; cleaned up legacy 'min/max' macro usage in DirectXTex

February 21, 2012
  • WICTextureLoader updated to handle systems and device drivers without BGRA or 16bpp format support

February 20, 2012
  • Some code cleanup for DirectXTex and DDSTextureLoader
  • Fixed bug in 10:10:10:2 format fixup in the LoadDDSFromMemory function
  • Fixed bugs in "non-zero alpha" special-case handling in LoadTGAFromFile
  • Fixed bug in _SwizzleScanline when copying alpha channel for BGRA<->RGBA swizzling

February 11, 2012
  • Update of DDSTextureLoader to also build in Metro style apps; added WICTextureLoader
  • Added CMYK WIC pixel formats to the DirectXTex conversion table

January 30, 2012
  • Minor code-cleanup for DirectXTex to enable use of PCH through 'directxtexp.h' header

January 24, 2011
  • Some code-cleanup for DirectXTex
  • Added DXGI 1.2 implementation for DDSTextureLoader and DirectXTex guarded with DXGI_1_2_FORMATS compiliation define

December 16, 2011
  • Fixed x64 compilation warnings in DDSTextureLoader

November 30, 2011
  • Fixed some of the constants used in IsSupportedTexture(),
  • added ability to strip off top levels of mips in DDSTextureLoader,
  • changed DirectXTex to use CoCreateInstance rather than LoadLibrary to obtain the WIC factory,
  • a few minor /analyze related annotations for DirectXTex

October 27, 2011
  • Original release

Source code checked in, #40358

Source code checked in, #40359

Source code checked in, #40360

Updated Release: March 2015 (Mar 27, 2015)

$
0
0
March 27, 2015
  • Added projects for Windows apps Technical Preview
  • Fixed bug with WIC-based mipmap generation for non-WIC supported formats
  • Fixed bug with WIC multiframe loader when resizing required
  • texconv: Added -nmap/-nmapamp for generating normal maps from height maps
  • texconv/texassemble: Updated to load multiframe WIC files (tiff, gif)
  • Minor code cleanup

The DirectXTex is now licensed under the MIT license rather than the MS-PL

Released: March 2015 (Mar 27, 2015)

$
0
0
March 27, 2015
  • Added projects for Windows apps Technical Preview
  • Fixed bug with WIC-based mipmap generation for non-WIC supported formats
  • Fixed bug with WIC multiframe loader when resizing required
  • texconv: Added -nmap/-nmapamp for generating normal maps from height maps
  • texconv/texassemble: Updated to load multiframe WIC files (tiff, gif)
  • Minor code cleanup

The DirectXTex is now licensed under the MIT license rather than the MS-PL
Viewing all 1174 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>