Closed GoogleCodeExporter closed 9 years ago
I can confirm this too. We using the SVN latest version on GeForce 8800GTX with
Cuda
2.2-beta on Windows XP 32-bit.
We are getting blocky textures - it looks like something connected with the
alpha.
This is my code:
if( use_nvtt )
{
nvtt::CompressionOptions compressionOptions;
compressionOptions.setQuality(nvtt::Quality_Highest);
switch( options.textureFormat )
{
case kDXT1: compressionOptions.setFormat(nvtt::Format_DXT1); break;
case kDXT1a: compressionOptions.setFormat(nvtt::Format_DXT1a); break;
case kDXT3: compressionOptions.setFormat(nvtt::Format_DXT3); break;
case kDXT5: compressionOptions.setFormat(nvtt::Format_DXT5); break;
default: assert(0);
}
nvtt::InputOptions inputOptions;
inputOptions.setTextureLayout(nvtt::TextureType_2D, inWidth, inHeight);
inputOptions.setFormat(nvtt::InputFormat_BGRA_8UB);
inputOptions.setMipmapGeneration(false);
inputOptions.setMipmapData( inData, inWidth, inHeight );//, 1, 0, 0 );
nvtt::Compressor compressor;
compressor.enableCudaAcceleration(true);
static bool cudaAccelerated;
//compressor.enableCudaAcceleration(false);
cudaAccelerated = compressor.isCudaAccelerationEnabled();
printf( "cudaAccelerated = %d\n", cudaAccelerated );
int estimatedSize = compressor.estimateSize(inputOptions, compressionOptions);
dxtcImg->pixels[face][mipLevel] = new byte[estimatedSize];
Image_nvttOutputHandler outputHandler( dxtcImg->pixels[face][mipLevel],
estimatedSize );
nvtt::OutputOptions outputOptions;
outputOptions.setOutputHandler( &outputHandler );
{
DEJA_CONTEXT("nvtt compress");
bool result = compressor.process( inputOptions, compressionOptions,
outputOptions );
printf("result = %d\n", result);
hr = result ? S_OK : S_FALSE;
}
}
else // Old way
{
DEJA_CONTEXT("nvDXTcompressBGRA");
hr = nvDXTcompressBGRA( inData, inWidth, inHeight, inWidth * channelCount,
&options, channelCount, Image_DxtcMipCallback, NULL );
}
Original comment by mal...@gmail.com
on 17 Apr 2009 at 9:43
This is now fixed in trunk. Sorry, this was a regression in trunk only and was
fixed
in the 2.0 branch already. Closing now.
Original comment by cast...@gmail.com
on 21 Sep 2009 at 6:46
Thanks!
Original comment by mal...@gmail.com
on 5 Oct 2009 at 9:09
Original issue reported on code.google.com by
cast...@gmail.com
on 16 Apr 2009 at 8:49