Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to import a 16-bit grayscale .dds (heightmap) without converting to 8-bit
#3
(09-25-2020, 07:57 AM)rich2005 Wrote: Can you post a link to one of these files, the only example dds I have is 8 bit (per channel) as reported by ImageMagick and a search only brings up the same.

I have the same issue.

I created my image with this header:

Code:
       DDS_PIXELFORMAT pf =
       {
               32,             // SIZE
               0x20000,        // DDPF_LUMINANCE
               0,              // FOUR CC
               16,             // RGB BIT COUNT
               0x0000ffff,       // R BIT MASK
               0,              // G BIT MASK
               0,              // B BIT MASK
               0,              // A BIT MASK
       };

       DDS_HEADER header =
       {
               124,                            // SIZE
               0x1 | 0x2 | 0x4 | 0x1000,       // FLAGS
               imh, imw,                       // HEIGHT,WIDTH
               0,0,0,                          // PITCH,DEPTH,MIPMAP
               { 0,0,0,0,0,0,0,0,0,0,0, },     // RESERVED
               pf,                             // PIXEL FORMAT
               0x1000,                         // CAPS
               0,                              // CAPS2
               0,                              // CAPS3
               0,                              // CAPS4
               0,                              // RESERVED
       };

Here's an example 16 bit luminosity file, I created:

https://stolk.org/tmp/out.dds
Reply


Messages In This Thread
RE: Trying to import a 16-bit grayscale .dds (heightmap) without converting to 8-bit - by bram - 11-18-2020, 11:40 PM

Forum Jump: