This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Encoding FP16/FP32 textures with astcenc

Hello,

How can I compress raw binary floating point (16 or 32) textures using astcenc tool?

I have these binary files with array of floats which is basically a raw data to be consumed by glTexImage2D. It has no headers with any information about texture dimensions, etc.

How should I consume such data into astcenc tool?

The only thing mentioned in documentation is that astcenc supports *.exr and *.hdr files for HDR source images.

Parents
  • Hi Oleksandr, 

    If you just have arrays of raw data, these are not supported directly via the command line tool, unless the uncompressed data is wrapped in a KTX or DDS wrapper. 

    The quickest solution here would be to write a small utility using the library interface, which can pass the data you need directly into the codec. There is a small standalone example application using the library interface in the GitHub tree:

    github.com/.../Example

    Most of the settings in the library API are direct mappings to the command line options, so hopefully not to hard to modify to suit your needs, but shout if you get stuck. 

    Kind regards, 
    Pete

Reply
  • Hi Oleksandr, 

    If you just have arrays of raw data, these are not supported directly via the command line tool, unless the uncompressed data is wrapped in a KTX or DDS wrapper. 

    The quickest solution here would be to write a small utility using the library interface, which can pass the data you need directly into the codec. There is a small standalone example application using the library interface in the GitHub tree:

    github.com/.../Example

    Most of the settings in the library API are direct mappings to the command line options, so hopefully not to hard to modify to suit your needs, but shout if you get stuck. 

    Kind regards, 
    Pete

Children