3
\$\begingroup\$

I have a texture with R32G32B32 floats. I create this texture in-program on D3D11, using DXGI_FORMAT_R32G32B32_FLOAT. Now I need to see the texture data for debug purposes, but it will not save to anything but dds, showing the error in debug output, "Can't find matching WIC format, please save this file to a DDS".

So, I write it to DDS but I can't open it now! The DirectX texture tool says "An error occurred trying to open that file".

I know the texture is working because I can read it in the GPU and the colors seem correct.

How can I view an R32G32B32 texture in an image viewer?

\$\endgroup\$
4
  • \$\begingroup\$ There is a nice DDS viewer here. It doesn't seem to be able to open the texture! \$\endgroup\$
    – bobobobo
    Jun 21, 2012 at 23:38
  • \$\begingroup\$ I believe this should be possible with the OpenEXR viewers, have you tried it? Direct link \$\endgroup\$
    – Dan
    Jun 22, 2012 at 12:03
  • \$\begingroup\$ I may be being a little dense but why can you not get the contents of the texture (by mapping it, or copying to staging resource), then bit-bang the raw content into a block of memory, process the pixels from R32R32R32 into U8U8U8 then just use that block as the source for a bitmap then view and save this? \$\endgroup\$
    – sebf
    Jun 25, 2012 at 17:42
  • \$\begingroup\$ Legacy D3DX10/11 is using WIC to save most file formats, and there are basically no WIC codecs that natively support 96bpp float. The one exception is that WIC can load 96bpp float TIFF files, but not write them, and there are a number of bugs doing it prior to Windows 8. Legacy D3DX10/11 is going to to use the 'DX10' header extension to write out a DDS file if given the 96bbp float format. A better solution is to write it using Radiance RGBE (HDR) format which is supported by legacy D3DX9 and DirectXTex, but not D3DX10/D3DX11. \$\endgroup\$ Mar 22, 2021 at 4:30

4 Answers 4

4
\$\begingroup\$

How about using PIX for Windows? That's probably the easiest way to view your texture.

As a bonus, you can right click your texture and "Save Picture As..." to shelve it for later, if that's something you need as well (though I'm not sure this will handle a R32G32B32 format).

\$\endgroup\$
4
\$\begingroup\$

The DDS file format changed between dx9 and dx10. dx9 had been supporting a lot of new features via kludges, these new features were finally added as full types with the switch to DXGI. What this means is that most existing DDS viewers do not support any of the new texture formats or even files saved from DirectXTex. (The new semi-open source microsoft library for manipulating DDS files. )

DirectXTex has a command line tool called DDsView.exe that can view all file formats.

\$\endgroup\$
0
2
\$\begingroup\$

The only way I could find to view a 96 bpp texture was using NVIDIA's DDS plug-in direct download 64-bit, 32-bit.

It's important to use the right bitness of the plug in, otherwise it won't work (which is what I found before)

\$\endgroup\$
0
\$\begingroup\$

From what I can tell the old DX texture tool doesn't support this format - it's certainly not available in the list of formats to convert to. What is available, however, is R32G32B32A32 float, and I've tested a little and determined that it can indeed convert to, save as, and subsequently re-open using it, so you could try converting to that format before saving.

\$\endgroup\$
2
  • \$\begingroup\$ You say "the old", is there a new DX texture tool around that I should be using? I see a bunch here \$\endgroup\$
    – bobobobo
    Jun 21, 2012 at 23:44
  • \$\begingroup\$ None that I'm aware of - I just said "the old" because it is old! Sorry for the confusion/false hope there. Interesting that I tested it with the 64-bit version in the June 2010 SDK but apparently MS never updated it to support the new formats. \$\endgroup\$ Jun 21, 2012 at 23:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .