View Full Version : decoding DDS float format (a bit OT...)
11-07-2005, 11:10 AM
Sorry if this is a bit off-topic, but I've been looking everywhere for source code that shows how to decode a DDS float texture.
nVidia released a lib (dxtlib) that is supposed to help reading them, but it doesn't.
Did anyone have any success reading DDS floating-point textures?
11-07-2005, 02:57 PM
I have code for that in my framework.
11-08-2005, 06:23 AM
I do this in my engine actually. The DDS file format is pretty straight forward. You can find the spec for the format here:
11-08-2005, 06:54 AM
This specification seems not to handle *float* images? Can DDS images contain *float* values at all?
11-08-2005, 10:17 AM
Yes, DDS can store float. 16 bit and 32 bit. Single channel, or 2 or 4. I think you don't compress them.
DDS is also supported by http://openil.sourceforge.net/
but it probably doesn't handle float.
11-08-2005, 06:56 PM
Originally posted by Hampel:
This specification seems not to handle *float* images? Can DDS images contain *float* values at all?The DDS format can handle all formats specified by D3D and any format that has a FOURCC code (and thus is easily extended when a new format comes around, like for instance 3Dc). Float images are definitely supported. It's easy to load too, since it's stored in a raw format. No compression or anything. In D3D you should be able to just fread() directly into locked surface.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.