Merge changes from the witness.
This commit is contained in:
@ -96,7 +96,7 @@ int main(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (nv::strCaseCmp(output.extension(), ".dds") != 0)
|
||||
if (nv::strCaseDiff(output.extension(), ".dds") != 0)
|
||||
{
|
||||
//output.stripExtension();
|
||||
output.append(".dds");
|
||||
|
@ -376,7 +376,7 @@ int main(int argc, char *argv[])
|
||||
// Set input options.
|
||||
nvtt::InputOptions inputOptions;
|
||||
|
||||
if (nv::strCaseCmp(input.extension(), ".dds") == 0)
|
||||
if (nv::strCaseDiff(input.extension(), ".dds") == 0)
|
||||
{
|
||||
// Load surface.
|
||||
nv::DirectDrawSurface dds(input.str());
|
||||
@ -428,7 +428,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
if (nv::strCaseCmp(input.extension(), ".exr") == 0 || nv::strCaseCmp(input.extension(), ".hdr") == 0)
|
||||
if (nv::strCaseDiff(input.extension(), ".exr") == 0 || nv::strCaseDiff(input.extension(), ".hdr") == 0)
|
||||
{
|
||||
loadAsFloat = true;
|
||||
}
|
||||
@ -519,6 +519,8 @@ int main(int argc, char *argv[])
|
||||
nvtt::CompressionOptions compressionOptions;
|
||||
compressionOptions.setFormat(format);
|
||||
|
||||
//compressionOptions.setQuantization(/*color dithering*/true, /*alpha dithering*/false, /*binary alpha*/false);
|
||||
|
||||
if (format == nvtt::Format_BC2) {
|
||||
// Dither alpha when using BC2.
|
||||
compressionOptions.setQuantization(/*color dithering*/false, /*alpha dithering*/true, /*binary alpha*/false);
|
||||
@ -539,6 +541,10 @@ int main(int argc, char *argv[])
|
||||
// compressionOptions.setPixelFormat(16, 16, 16, 16);
|
||||
// compressionOptions.setPixelType(nvtt::PixelType_UnsignedNorm);
|
||||
// compressionOptions.setPixelFormat(16, 0, 0, 0);
|
||||
|
||||
//compressionOptions.setQuantization(/*color dithering*/true, /*alpha dithering*/false, /*binary alpha*/false);
|
||||
//compressionOptions.setPixelType(nvtt::PixelType_UnsignedNorm);
|
||||
//compressionOptions.setPixelFormat(5, 6, 5, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
static bool loadImage(nv::Image & image, const char * fileName)
|
||||
{
|
||||
if (nv::strCaseCmp(nv::Path::extension(fileName), ".dds") == 0)
|
||||
if (nv::strCaseDiff(nv::Path::extension(fileName), ".dds") == 0)
|
||||
{
|
||||
nv::DirectDrawSurface dds(fileName);
|
||||
if (!dds.isValid())
|
||||
@ -246,7 +246,7 @@ int main(int argc, char *argv[])
|
||||
double g = float(c0.g - c1.g);
|
||||
double b = float(c0.b - c1.b);
|
||||
double a = float(c0.a - c1.a);
|
||||
|
||||
|
||||
error_r.addSample(r);
|
||||
error_g.addSample(g);
|
||||
error_b.addSample(b);
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
static bool loadImage(nv::Image & image, const char * fileName)
|
||||
{
|
||||
if (nv::strCaseCmp(nv::Path::extension(fileName), ".dds") == 0)
|
||||
if (nv::strCaseDiff(nv::Path::extension(fileName), ".dds") == 0)
|
||||
{
|
||||
nv::DirectDrawSurface dds(fileName);
|
||||
if (!dds.isValid())
|
||||
|
Reference in New Issue
Block a user