Fix DXT1a support.
This commit is contained in:
@ -241,7 +241,7 @@ void nv::compressDXT1a(const Image * image, const OutputOptions::Private & outpu
|
|||||||
rgba.init(image, x, y);
|
rgba.init(image, x, y);
|
||||||
|
|
||||||
// Compress color.
|
// Compress color.
|
||||||
squish::ColourSet colours((uint8 *)rgba.colors(), 0);
|
squish::ColourSet colours((uint8 *)rgba.colors(), squish::kDxt1|squish::kWeightColourByAlpha);
|
||||||
squish::WeightedClusterFit fit(&colours, squish::kDxt1);
|
squish::WeightedClusterFit fit(&colours, squish::kDxt1);
|
||||||
fit.setMetric(compressionOptions.colorWeight.x(), compressionOptions.colorWeight.y(), compressionOptions.colorWeight.z());
|
fit.setMetric(compressionOptions.colorWeight.x(), compressionOptions.colorWeight.y(), compressionOptions.colorWeight.z());
|
||||||
fit.Compress(&block);
|
fit.Compress(&block);
|
||||||
|
@ -27,6 +27,12 @@
|
|||||||
|
|
||||||
namespace squish {
|
namespace squish {
|
||||||
|
|
||||||
|
// @@ Add flags:
|
||||||
|
// - FindColorMatch
|
||||||
|
// - DXT1a
|
||||||
|
// - WeightColorByAlpha
|
||||||
|
|
||||||
|
|
||||||
ColourSet::ColourSet( u8 const* rgba, int flags )
|
ColourSet::ColourSet( u8 const* rgba, int flags )
|
||||||
: m_count( 0 ),
|
: m_count( 0 ),
|
||||||
m_transparent( false )
|
m_transparent( false )
|
||||||
|
Reference in New Issue
Block a user