Modifying UASTC HDR DFD

This commit is contained in:
Richard Geldreich
2024-09-10 20:48:20 -04:00
parent d25a43bdc3
commit 1d56bfd544
2 changed files with 16 additions and 9 deletions

View File

@@ -2970,12 +2970,17 @@ namespace basisu
// HDR TODO - what is the best Khronos DFD to use for UASTC HDR?
static uint8_t g_ktx2_uastc_hdr_nonalpha_dfd[44] =
{
0x2C,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,
0x2,0x0,0x28,0x0, 0xA7,0x1,0x1,0x0,
0x3,0x3,0x0,0x0, 0x10,0x0,0x0,0x0,
0x0,0x0,0x0,0x0, 0x0,0x0,0x7F,0x4,
0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,
0xFF,0xFF,0xFF,0xFF
0x2C,0x0,0x0,0x0, // 0 totalSize
0x0,0x0,0x0,0x0, // 1 descriptorType/vendorId
0x2,0x0,0x28,0x0, // 2 descriptorBlockSize/versionNumber
0xA7,0x1,0x1,0x0, // 3 flags, transferFunction, colorPrimaries, colorModel
0x3,0x3,0x0,0x0, // 4 texelBlockDimension0-texelBlockDimension3
0x10,0x0,0x0,0x0, // 5 bytesPlane0-bytesPlane3
0x0,0x0,0x0,0x0, // 6 bytesPlane4-bytesPlane7
0x0,0x0,0x7F,0x80, // 7 bitLength/bitOffset/channelType and Qualifer flags (KHR_DF_SAMPLE_DATATYPE_FLOAT etc.)
0x0,0x0,0x0,0x0, // 8 samplePosition0-samplePosition3
0x0,0x0,0x0,0x0, // 9 sampleLower (0.0)
0x00, 0x00, 0x80, 0xF3 // 10 sampleHigher (?)
};
void basis_compressor::get_dfd(uint8_vec &dfd, const basist::ktx2_header &header)