   how to read floating point textures from DDS files
  hi guys, could some one explain me if DDS files have any support for floating point formats and if so how do I identify it when reading the files?The problem is that i can save textures in A32B32G32R32F format using the DDS plugin for photoshop, but i don't know how to read that information in my engine because there's no information about floating point textures in the DDS file especification on MSDN.   
  DXT compression specifically uses R5G6B5 storage for the two RGB colors that are interpolated for a 4x4 block of pixels.  It also uses 8-bit storage for A in DXT3/5 compression.  That is, no 32-bit floating-point support.  Have you looked at the DDS file size for the Photoshop plugin and compared to compression of an 8-bit RGBA image of the same width/height?  Can you open the file with the DirectX Texture Tool?  Maybe what they have counts as a DXT "extension"?  If so, then you need to know what their compression layout is.;  What do you mean by "read" the textures?  Once you've loaded it through D3DX, you can simply bind it to a sampler and use it as you would any other texture.  You may just need to check your device caps to ensure that the GPU can use the texture (and filter it, if necessary).If you need to read the texture with the CPU, you can simply lock it and read it like you would any other texture (just remember to cast to FLOAT).If you need to know what format the texture is before you load it, you can use the D3DXGetImageInfoFromFile function.;Quote:Original post by Dave EberlyDXT compression specifically uses R5G6B5 storage for the two RGB colors that are interpolated for a 4x4 block of pixels.  It also uses 8-bit storage for A in DXT3/5 compression.  That is, no 32-bit floating-point support.  Have you looked at the DDS file size for the Photoshop plugin and compared to compression of an 8-bit RGBA image of the same width/height?  Can you open the file with the DirectX Texture Tool?  Maybe what they have counts as a DXT "extension"?  If so, then you need to know what their compression layout is.He's not using DXT compression, he saved it as A32B32G32R32F.  DDS supports all kinds of texture formats, including fp formats.   ;  Sorry for answering to you replies so late, i've been busy during the entire week. I forgot to tell a few important details, first of all i'm using OpenGL so i really need to understand the file layout for FP textures because there's no helper interface to open the DDS files for me like in Direct3D.When the texture is saved in the A32B32G32R32F format, some of the file's fields get some strange values. The fourCC field gets the value "t" (first character "t" and all the other 3 are assigned with 0).And the rgbBitCount field is assigned with value 0, wich is really strange.That's all I could find out, does anyone know what this information, mainly the fourCC code, means?;  At the risk of pimping my own library have a look at GTL aka Game Texture Loader, the most recent release adds support for DDS files with floating point format texture data.Even if you don't feel like using the library you can have a poke around in the source to see how it's done, the code is zlib so feel free to take what you need [smile]   ;  Thanks phantom, I've taken a look at the GTL code and I've understood how FP formats are stored. Some odd formats like the FP formats are identified in DDS files using only a single character in the fourCC code.I'm now curious to know where the author of GTL found this information, it would be nice to get my hands on a complete DDS specification.   ;  Well, while I wrote a fair amount of the GTL code the floating point DDS files was done by someone else so I've no idea how they found it out; it might well have been via experimentation and simply looking at how the relivent DDS files were put together.   