Merge pull request #252 from lunkhound/fix-normal-maps
fix a bug where created normal maps were not packed prior to compression
This commit is contained in:
commit
1004d5d5b5
@ -263,6 +263,7 @@ bool Compressor::Private::compress(const InputOptions::Private & inputOptions, c
|
|||||||
if (inputOptions.convertToNormalMap) {
|
if (inputOptions.convertToNormalMap) {
|
||||||
img.toGreyScale(inputOptions.heightFactors.x, inputOptions.heightFactors.y, inputOptions.heightFactors.z, inputOptions.heightFactors.w);
|
img.toGreyScale(inputOptions.heightFactors.x, inputOptions.heightFactors.y, inputOptions.heightFactors.z, inputOptions.heightFactors.w);
|
||||||
img.toNormalMap(inputOptions.bumpFrequencyScale.x, inputOptions.bumpFrequencyScale.y, inputOptions.bumpFrequencyScale.z, inputOptions.bumpFrequencyScale.w);
|
img.toNormalMap(inputOptions.bumpFrequencyScale.x, inputOptions.bumpFrequencyScale.y, inputOptions.bumpFrequencyScale.z, inputOptions.bumpFrequencyScale.w);
|
||||||
|
img.packNormals();
|
||||||
}
|
}
|
||||||
|
|
||||||
// To linear space.
|
// To linear space.
|
||||||
|
Loading…
Reference in New Issue
Block a user