Apply patch to fix issue 192.
This commit is contained in:
parent
27024253ce
commit
022944e49b
@ -268,6 +268,9 @@ bool Compressor::Private::compress(const InputOptions::Private & inputOptions, c
|
|||||||
if (!img.isNormalMap()) {
|
if (!img.isNormalMap()) {
|
||||||
img.toLinear(inputOptions.inputGamma);
|
img.toLinear(inputOptions.inputGamma);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
img.expandNormals();
|
||||||
|
}
|
||||||
|
|
||||||
// Resize input.
|
// Resize input.
|
||||||
img.resize(w, h, d, ResizeFilter_Box);
|
img.resize(w, h, d, ResizeFilter_Box);
|
||||||
@ -276,6 +279,9 @@ bool Compressor::Private::compress(const InputOptions::Private & inputOptions, c
|
|||||||
if (!img.isNormalMap()) {
|
if (!img.isNormalMap()) {
|
||||||
tmp.toGamma(inputOptions.outputGamma);
|
tmp.toGamma(inputOptions.outputGamma);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
tmp.packNormals();
|
||||||
|
}
|
||||||
|
|
||||||
quantize(tmp, compressionOptions);
|
quantize(tmp, compressionOptions);
|
||||||
compress(tmp, f, 0, compressionOptions, outputOptions);
|
compress(tmp, f, 0, compressionOptions, outputOptions);
|
||||||
@ -304,6 +310,9 @@ bool Compressor::Private::compress(const InputOptions::Private & inputOptions, c
|
|||||||
if (!img.isNormalMap()) {
|
if (!img.isNormalMap()) {
|
||||||
img.toLinear(inputOptions.inputGamma);
|
img.toLinear(inputOptions.inputGamma);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
img.expandNormals();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (inputOptions.mipmapFilter == MipmapFilter_Kaiser) {
|
if (inputOptions.mipmapFilter == MipmapFilter_Kaiser) {
|
||||||
@ -323,6 +332,7 @@ bool Compressor::Private::compress(const InputOptions::Private & inputOptions, c
|
|||||||
img.normalizeNormalMap();
|
img.normalizeNormalMap();
|
||||||
}
|
}
|
||||||
tmp = img;
|
tmp = img;
|
||||||
|
tmp.packNormals();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
tmp = img;
|
tmp = img;
|
||||||
|
Loading…
Reference in New Issue
Block a user