mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-26 23:05:38 +00:00
squish update (primarily to add additional formats for later usage)
This commit is contained in:
parent
9c7b5eec73
commit
ac37547d4f
24 changed files with 256 additions and 1072 deletions
|
|
@ -31,22 +31,21 @@
|
|||
|
||||
namespace squish {
|
||||
|
||||
ClusterFit::ClusterFit( ColourSet const* colours, int flags )
|
||||
ClusterFit::ClusterFit( ColourSet const* colours, int flags, float* metric )
|
||||
: ColourFit( colours, flags )
|
||||
{
|
||||
// set the iteration count
|
||||
m_iterationCount = ( m_flags & kColourIterativeClusterFit ) ? kMaxIterations : 1;
|
||||
|
||||
// initialise the best error
|
||||
m_besterror = VEC4_CONST( FLT_MAX );
|
||||
|
||||
// initialise the metric
|
||||
bool perceptual = ( ( m_flags & kColourMetricPerceptual ) != 0 );
|
||||
if( perceptual )
|
||||
m_metric = Vec4( 0.2126f, 0.7152f, 0.0722f, 0.0f );
|
||||
// initialise the metric (old perceptual = 0.2126f, 0.7152f, 0.0722f)
|
||||
if( metric )
|
||||
m_metric = Vec4( metric[0], metric[1], metric[2], 1.0f );
|
||||
else
|
||||
m_metric = VEC4_CONST( 1.0f );
|
||||
|
||||
// initialise the best error
|
||||
m_besterror = VEC4_CONST( FLT_MAX );
|
||||
|
||||
// cache some values
|
||||
int const count = m_colours->GetCount();
|
||||
Vec3 const* values = m_colours->GetPoints();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue