2

Does anyone know if it is possible to determine the compression format of an existing DDS texture file? I have the NVidia Photoshop plugin, a DXTViewer app, and Honeyview app, but cannot seem to find any way to obtain this simple information?

By compression formats, I'm referring to BC7, BC6H, BC3, BC2, etc.

Robert
  • 413
  • 4
  • 12
  • I forgot to mention that DXTViewer does show the format of some files, but it won't even load most of the images I'm testing it with. I'm assuming it can't understand newer compression modes. – Robert Jan 11 '23 at 20:09

1 Answers1

2

Most DDS viewers out there only understand how to parse the standard 'DDS' file. Since the introduction of Direct3D 10, there is a "DX10" extension header which is indicated by the FourCC value of "DX10" in the old DDPIXELFORMAT. This was implemented in D3DX10, D3DX11, and DirectXTex. See this blog post.

BTW, modern versions of Visual Studio can view most DDS files.

You can build the ddsdump.cpp which also needs dds.h to build a quick console application which dumps out the header information and format.

See also DirectXTex on GitHub and Microsoft Docs.

WIC on Windows 8.1 or later has a built-in DDS codec, but it only supports "DXT1", "DXT2", "DXT3", "DXT4", and "DXT5" (i.e. classic BC1-BC3 compression). It's only there for some WebGL scenarios.

I've had updating the old legacy DirectX SDK Texture Viewer (a.k.a. dxtex) on my backlog for ages. So far I've managed to get the existing version open source but haven't any time to dig into support the newer "DX10" header.

Chuck Walbourn
  • 38,259
  • 2
  • 58
  • 81
  • Thanks, this seems to be as good as it gets at the moment. After fumbling around, I did realize that Honeyview will show some DDS formats when the file information button (EXIF at top left) is toggled on. It can't load some types at all (32.32f), and will show some newer formats like BC7 simply as "DX10", but will show most of the older types. Its a quick first step when trying to decipher one. – Robert Jan 12 '23 at 19:26