grendizerufo / nvidia-texture-tools

Automatically exported from code.google.com/p/nvidia-texture-tools
Other
0 stars 0 forks source link

CompressRGB clobbers data if byteCount is not 1 #49

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I found that attempting to convert an image to A4R4G4B4 format was the
easiest way to reproduce this issue.  Instead of seeing a full image in the
output, the second half of the image is zeroed (right side).  This was
tested with NVidia Texture Tools release 2.0.3 on Windows XP (32 bit).

If my suspicions are correct, it seems that the padding is clobbering data
because it makes an assumption about the byte-width of the image.

Please find attached what I believe to be a reasonable fix for this issue.

Calls made:
CompressionOptions::setFormat( nvtt::Format_RGBA );
CompressionOptions::setPixelFormat( 16, 0x0f00, 0x00f0, 0x000f, 0xf000 );

Original issue reported on code.google.com by jon...@gmail.com on 11 Jun 2008 at 4:06

Attachments:

GoogleCodeExporter commented 9 years ago
I've applied your patch. Thanks!

Original comment by cast...@gmail.com on 12 Jun 2008 at 1:21