s3tc-dxt-decompression | S3TC DXT1/DXT5 texture decompression routines | Compression library
kandi X-RAY | s3tc-dxt-decompression Summary
kandi X-RAY | s3tc-dxt-decompression Summary
S3TC DXT1/DXT5 texture decompression routines.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of s3tc-dxt-decompression
s3tc-dxt-decompression Key Features
s3tc-dxt-decompression Examples and Code Snippets
Community Discussions
Trending Discussions on s3tc-dxt-decompression
QUESTION
I've read a lot of articles and code but I still cannot get this to work, I've read all the 128 bytes of the header in my texture and them read 65536 bytes of compressed data of the actual texture(the texture's resolution is 256x256 and each compressed pixel uses 1 byte). I've tried to create my decompression algorithm with no success, them I've decided to use someone's else, so I found this code here. This is the arguments I was trying to pass to it so it would decompress my DDS texture.BlockDecompressImageDXT5(textureHeader.dwWidth, textureHeader.dwHeight, temp, packedData)
Note: textureHeader is a valid struct with the DDS texture's header data loaded into it, temp
is a unsigned char array holding all the DDS data that was read from the DDS texture and packedData
is a unsigned long array I was expecting to receive the final decompressed data. So in the code I've linked, the RGBA channels for each pixel were packed in the PackRGBA
function, one byte for each color in the packedData
. Before pointing the data to the texture's data at D3D11_SUBRESOURCE_DATA
pSysMem, I've distributed each byte from the unsigned long packedData
to 4 different unsigned char m_DDSData
this way:
ANSWER
Answered 2021-Apr-13 at 20:36For a full description of the BC3 compression scheme, see Microsoft Docs. BC3 is just the modern name for DXT4/DXT5 compression a.k.a. S3TC. In short, it compresses a 4x4 block of pixels at a time into the following structures resulting in 16 bytes per block:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install s3tc-dxt-decompression
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page