BC6/7 progress. Work in progress.

This commit is contained in:
castano
2010-06-21 22:23:28 +00:00
parent f2c581dec1
commit 5c60989043
8 changed files with 83 additions and 25 deletions

View File

@ -24,10 +24,31 @@
#include "CompressorDX11.h"
#include "nvtt.h"
#include "CompressionOptions.h"
#include "bc6h/zoh.h"
#include "bc6h/utils.h"
using namespace nv;
using namespace nvtt;
void CompressorBC6::compressBlock(Tile & tile, AlphaMode alphaMode, const CompressionOptions::Private & compressionOptions, void * output)
{
NV_UNUSED(alphaMode); // ZOH does not support alpha.
if (compressionOptions.pixelType == PixelType_UnsignedFloat ||
compressionOptions.pixelType == PixelType_UnsignedNorm ||
compressionOptions.pixelType == PixelType_UnsignedInt)
{
Utils::FORMAT = UNSIGNED_F16; // @@ Do not use globals.
}
else
{
Utils::FORMAT = SIGNED_F16;
}
ZOH::compress(tile, (char *)output);
}