ASTC normal map support

- Update astc to 57af6af from https://github.com/andrewwillmott/astc-encoder
- Expand bimg::Quality to include source-as-normal-map
  modes, intended as a hint to the encoder.
- Hook this up for ASTC, and in texturec
This commit is contained in:
Andrew Willmott
2019-07-24 01:35:33 +01:00
parent 58d682e633
commit 73fa013ec0
8 changed files with 81 additions and 179 deletions

View File

@@ -450,6 +450,7 @@ bimg::ImageContainer* convert(bx::AllocatorI* _allocator, const void* _inputData
, rgba
);
bimg::Quality::Enum nmapQuality = bimg::Quality::Enum(_options.quality + bimg::Quality::NormalMap_Default);
bimg::imageEncodeFromRgba32f(_allocator
, dstData
, rgbaDst
@@ -457,7 +458,7 @@ bimg::ImageContainer* convert(bx::AllocatorI* _allocator, const void* _inputData
, dstMip.m_height
, dstMip.m_depth
, outputFormat
, _options.quality
, nmapQuality
, _err
);
@@ -489,7 +490,7 @@ bimg::ImageContainer* convert(bx::AllocatorI* _allocator, const void* _inputData
, dstMip.m_height
, dstMip.m_depth
, outputFormat
, _options.quality
, nmapQuality
, _err
);
}
@@ -1362,7 +1363,7 @@ int main(int _argc, const char* _argv[])
}
else
{
help(NULL, err);
help("Failed to create output", err);
return bx::kExitFailure;
}